diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-05-18 20:35:06 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-07-04 22:39:07 -0400 |
commit | a516f21b1f2bb25ae31ceebba9664e0eb0ebc37f (patch) | |
tree | edfe0a3120803e00ce731ac18e54b3af5f9cfdd8 | |
parent | 1e100849574dc7d0659e51053a18f3683499e85d (diff) | |
download | runes-a516f21b1f2bb25ae31ceebba9664e0eb0ebc37f.tar.gz runes-a516f21b1f2bb25ae31ceebba9664e0eb0ebc37f.zip |
store this on the screen
-rw-r--r-- | src/screen.h | 1 | ||||
-rw-r--r-- | src/window-xlib.c | 8 | ||||
-rw-r--r-- | src/window-xlib.h | 1 |
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 { |