Commit e84016cd authored by Samuel Thibault's avatar Samuel Thibault

Revert "gdk: deactivate/activate surface on keyboard grabs"

This reverts commits f23bfc6b. and
c926b28d.

This reintroduces #85, but see discussion in
!433 for the unforeseen
invasive consequences of these commits.
parent 4eee51b0
......@@ -29,8 +29,8 @@
#include "gdkkeysyms.h"
#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);
......@@ -842,7 +842,7 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
if (toplevel->focus_window == original)
return;
had_focus = APPEARS_FOCUSED (toplevel);
had_focus = HAS_FOCUS (toplevel);
x11_screen = GDK_X11_SCREEN (gdk_window_get_screen (window));
switch (detail)
......@@ -904,7 +904,7 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
break;
}
if (APPEARS_FOCUSED (toplevel) != had_focus)
if (HAS_FOCUS (toplevel) != had_focus)
{
GdkEvent *event;
......
......@@ -32,8 +32,8 @@ static gboolean gdk_event_source_dispatch (GSource *source,
gpointer user_data);
static void gdk_event_source_finalize (GSource *source);
#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
{
......@@ -148,10 +148,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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment