diff options
-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 { |