[gtk: 1/2] Revert "gdk: deactivate/activate surface on keyboard grabs"
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 1/2] Revert "gdk: deactivate/activate surface on keyboard grabs"
- Date: Wed, 1 May 2019 03:32:32 +0000 (UTC)
commit 99eee5cea9de154ae4ccf3088431925d777eec6b
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date: Tue Apr 30 16:45:51 2019 +0200
Revert "gdk: deactivate/activate surface on keyboard grabs"
This reverts commits 35417a5a74bfebd69b5c069d7a2f517ba571bcf9 and
01455399e83a3dbafb0cdc6e12c7003b2f472a40.
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/gdkdevicemanager-core-x11.c | 8 ++++----
gdk/x11/gdkeventsource.c | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gdk/x11/gdkdevicemanager-core-x11.c b/gdk/x11/gdkdevicemanager-core-x11.c
index 280510efdc..ee7e369584 100644
--- a/gdk/x11/gdkdevicemanager-core-x11.c
+++ b/gdk/x11/gdkdevicemanager-core-x11.c
@@ -31,8 +31,8 @@
-#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 gdk_x11_device_manager_core_finalize (GObject *object);
static void gdk_x11_device_manager_core_constructed (GObject *object);
@@ -752,7 +752,7 @@ _gdk_device_manager_core_handle_focus (GdkSurface *surface,
if (toplevel->focus_window == original)
return;
- had_focus = APPEARS_FOCUSED (toplevel);
+ had_focus = HAS_FOCUS (toplevel);
x11_screen = GDK_X11_SCREEN (GDK_SURFACE_SCREEN (surface));
switch (detail)
@@ -814,7 +814,7 @@ _gdk_device_manager_core_handle_focus (GdkSurface *surface,
break;
}
- if (APPEARS_FOCUSED (toplevel) != had_focus)
+ if (HAS_FOCUS (toplevel) != had_focus)
{
GdkEvent *event;
diff --git a/gdk/x11/gdkeventsource.c b/gdk/x11/gdkeventsource.c
index 25c68c3a3e..23ab3200b2 100644
--- a/gdk/x11/gdkeventsource.c
+++ b/gdk/x11/gdkeventsource.c
@@ -36,8 +36,8 @@ static void gdk_event_source_finalize (GSource *source);
static GQuark quark_needs_enter = 0;
-#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)
struct _GdkEventSource
{
@@ -108,10 +108,10 @@ handle_focus_change (GdkEventCrossing *event)
if (!event->focus || toplevel->has_focus_window)
return;
- had_focus = APPEARS_FOCUSED (toplevel);
+ had_focus = HAS_FOCUS (toplevel);
toplevel->has_pointer_focus = focus_in;
- if (APPEARS_FOCUSED (toplevel) != had_focus)
+ if (HAS_FOCUS (toplevel) != had_focus)
{
GdkEvent *focus_event;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]