forked from AuroraMiddleware/gtk
Merge branch 'window-activate-revert-master' into 'master'
Revert "gdk: deactivate/activate surface on keyboard grabs" See merge request GNOME/gtk!795
This commit is contained in:
commit
6b4a82224c
@ -31,8 +31,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define APPEARS_FOCUSED(toplevel) \
|
#define HAS_FOCUS(toplevel) \
|
||||||
((toplevel)->has_focus || (toplevel)->has_focus_window || (toplevel)->has_pointer_focus)
|
((toplevel)->has_focus || (toplevel)->has_pointer_focus)
|
||||||
|
|
||||||
static void gdk_x11_device_manager_core_finalize (GObject *object);
|
static void gdk_x11_device_manager_core_finalize (GObject *object);
|
||||||
static void gdk_x11_device_manager_core_constructed (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)
|
if (toplevel->focus_window == original)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
had_focus = APPEARS_FOCUSED (toplevel);
|
had_focus = HAS_FOCUS (toplevel);
|
||||||
x11_screen = GDK_X11_SCREEN (GDK_SURFACE_SCREEN (surface));
|
x11_screen = GDK_X11_SCREEN (GDK_SURFACE_SCREEN (surface));
|
||||||
|
|
||||||
switch (detail)
|
switch (detail)
|
||||||
@ -814,7 +814,7 @@ _gdk_device_manager_core_handle_focus (GdkSurface *surface,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (APPEARS_FOCUSED (toplevel) != had_focus)
|
if (HAS_FOCUS (toplevel) != had_focus)
|
||||||
{
|
{
|
||||||
GdkEvent *event;
|
GdkEvent *event;
|
||||||
|
|
||||||
|
@ -36,8 +36,8 @@ static void gdk_event_source_finalize (GSource *source);
|
|||||||
|
|
||||||
static GQuark quark_needs_enter = 0;
|
static GQuark quark_needs_enter = 0;
|
||||||
|
|
||||||
#define APPEARS_FOCUSED(toplevel) \
|
#define HAS_FOCUS(toplevel) \
|
||||||
((toplevel)->has_focus || (toplevel)->has_focus_window || (toplevel)->has_pointer_focus)
|
((toplevel)->has_focus || (toplevel)->has_pointer_focus)
|
||||||
|
|
||||||
struct _GdkEventSource
|
struct _GdkEventSource
|
||||||
{
|
{
|
||||||
@ -108,10 +108,10 @@ handle_focus_change (GdkEventCrossing *event)
|
|||||||
if (!event->focus || toplevel->has_focus_window)
|
if (!event->focus || toplevel->has_focus_window)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
had_focus = APPEARS_FOCUSED (toplevel);
|
had_focus = HAS_FOCUS (toplevel);
|
||||||
toplevel->has_pointer_focus = focus_in;
|
toplevel->has_pointer_focus = focus_in;
|
||||||
|
|
||||||
if (APPEARS_FOCUSED (toplevel) != had_focus)
|
if (HAS_FOCUS (toplevel) != had_focus)
|
||||||
{
|
{
|
||||||
GdkEvent *focus_event;
|
GdkEvent *focus_event;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user