[gtk/gtk-2-24: 1/2] Revert "gdk: deactivation/activate window on keyboard grabs"
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-2-24: 1/2] Revert "gdk: deactivation/activate window on keyboard grabs"
- Date: Wed, 9 Jan 2019 16:30:46 +0000 (UTC)
commit 75a4eeb2f8a2a479298f68a022a72277cbe9f607
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date: Fri Jan 4 16:52:15 2019 +0100
Revert "gdk: deactivation/activate window on keyboard grabs"
This reverts commits 853f786727a954d10ed78405adc18e0772ccd1cb and
00b17063ac8e58d436b7ee5e79da83e74cbbbb30.
This reintroduces #85, but see discussion in
https://gitlab.gnome.org/GNOME/gtk/merge_requests/433 for the unforeseen
invasive consequences of these commits.
gdk/x11/gdkevents-x11.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/gdk/x11/gdkevents-x11.c b/gdk/x11/gdkevents-x11.c
index bef77b5bf8..186a8f5cb2 100644
--- a/gdk/x11/gdkevents-x11.c
+++ b/gdk/x11/gdkevents-x11.c
@@ -621,8 +621,8 @@ gdk_check_wm_state_changed (GdkWindow *window)
do_net_wm_state_changes (window);
}
-#define APPEARS_FOCUSED(toplevel) \
- ((toplevel)->has_focus || (toplevel)->has_focus_window || (toplevel)->has_pointer_focus)
+#define HAS_FOCUS(toplevel) \
+ ((toplevel)->has_focus || (toplevel)->has_pointer_focus)
static void
generate_focus_event (GdkWindow *window,
@@ -1344,11 +1344,11 @@ gdk_event_translate (GdkDisplay *display,
if (xevent->xcrossing.focus && !toplevel->has_focus_window)
{
- gboolean had_focus = APPEARS_FOCUSED (toplevel);
+ gboolean had_focus = HAS_FOCUS (toplevel);
toplevel->has_pointer_focus = TRUE;
- if (APPEARS_FOCUSED (toplevel) != had_focus)
+ if (HAS_FOCUS (toplevel) != had_focus)
generate_focus_event (window, TRUE);
}
}
@@ -1441,11 +1441,11 @@ gdk_event_translate (GdkDisplay *display,
if (xevent->xcrossing.focus && !toplevel->has_focus_window)
{
- gboolean had_focus = APPEARS_FOCUSED (toplevel);
+ gboolean had_focus = HAS_FOCUS (toplevel);
toplevel->has_pointer_focus = FALSE;
- if (APPEARS_FOCUSED (toplevel) != had_focus)
+ if (HAS_FOCUS (toplevel) != had_focus)
generate_focus_event (window, FALSE);
}
}
@@ -1523,7 +1523,7 @@ gdk_event_translate (GdkDisplay *display,
if (toplevel)
{
- gboolean had_focus = APPEARS_FOCUSED (toplevel);
+ gboolean had_focus = HAS_FOCUS (toplevel);
switch (xevent->xfocus.detail)
{
@@ -1569,7 +1569,7 @@ gdk_event_translate (GdkDisplay *display,
break;
}
- if (APPEARS_FOCUSED (toplevel) != had_focus)
+ if (HAS_FOCUS (toplevel) != had_focus)
generate_focus_event (window, TRUE);
}
break;
@@ -1582,7 +1582,7 @@ gdk_event_translate (GdkDisplay *display,
if (toplevel)
{
- gboolean had_focus = APPEARS_FOCUSED (toplevel);
+ gboolean had_focus = HAS_FOCUS (toplevel);
switch (xevent->xfocus.detail)
{
@@ -1620,7 +1620,7 @@ gdk_event_translate (GdkDisplay *display,
break;
}
- if (APPEARS_FOCUSED (toplevel) != had_focus)
+ if (HAS_FOCUS (toplevel) != had_focus)
generate_focus_event (window, FALSE);
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]