aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-05-18 20:35:06 -0400
committerJesse Luehrs <doy@tozt.net>2014-07-04 22:39:07 -0400
commita516f21b1f2bb25ae31ceebba9664e0eb0ebc37f (patch)
treeedfe0a3120803e00ce731ac18e54b3af5f9cfdd8
parent1e100849574dc7d0659e51053a18f3683499e85d (diff)
downloadrunes-a516f21b1f2bb25ae31ceebba9664e0eb0ebc37f.tar.gz
runes-a516f21b1f2bb25ae31ceebba9664e0eb0ebc37f.zip
store this on the screen
-rw-r--r--src/screen.h1
-rw-r--r--src/window-xlib.c8
-rw-r--r--src/window-xlib.h1
3 files changed, 4 insertions, 6 deletions
diff --git a/src/screen.h b/src/screen.h
index 9554375..8e94fce 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -106,6 +106,7 @@ struct runes_screen {
unsigned char audible_bell: 1;
unsigned char update_title: 1;
unsigned char update_icon_name: 1;
+ unsigned char has_selection: 1;
unsigned char dirty: 1;
};
diff --git a/src/window-xlib.c b/src/window-xlib.c
index af5b2b8..e497d34 100644
--- a/src/window-xlib.c
+++ b/src/window-xlib.c
@@ -871,11 +871,11 @@ static void runes_window_backend_stop_selection(
if (start->row == end->row && start->col == end->col) {
XSetSelectionOwner(w->dpy, XA_PRIMARY, None, time);
- w->has_selection = 0;
+ t->scr.has_selection = 0;
}
else {
XSetSelectionOwner(w->dpy, XA_PRIMARY, w->w, time);
- w->has_selection = (XGetSelectionOwner(w->dpy, XA_PRIMARY) == w->w);
+ t->scr.has_selection = (XGetSelectionOwner(w->dpy, XA_PRIMARY) == w->w);
}
}
@@ -983,11 +983,9 @@ static void runes_window_backend_handle_selection_notify_event(
static void runes_window_backend_handle_selection_clear_event(
RunesTerm *t, XSelectionClearEvent *e)
{
- RunesWindowBackend *w = &t->w;
-
UNUSED(e);
- w->has_selection = 0;
+ t->scr.has_selection = 0;
}
static void runes_window_backend_handle_selection_request_event(
diff --git a/src/window-xlib.h b/src/window-xlib.h
index a72f2cd..e4efeff 100644
--- a/src/window-xlib.h
+++ b/src/window-xlib.h
@@ -29,7 +29,6 @@ struct runes_window {
Atom atoms[RUNES_NUM_ATOMS];
char visual_bell_is_ringing: 1;
- char has_selection: 1;
};
typedef struct {