[gtk+] x11: Set GdkToplevelX11.have_focused on creation
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] x11: Set GdkToplevelX11.have_focused on creation
- Date: Wed, 4 Apr 2012 16:03:17 +0000 (UTC)
commit 987baaba5c395c08401286dd146ffed6f473629f
Author: Rui Matos <tiagomatos gmail com>
Date: Sat Mar 31 16:01:36 2012 +0200
x11: Set GdkToplevelX11.have_focused on creation
Since the order in which _NET_WM_STATE and _NET_WM_DESKTOP are set, or
even *if* they are set, isn't defined, we could end up unsetting
GDK_WINDOW_STATE_FOCUSED given that both handlers for these two X
properties end up doing window state changes for all states. As we
want GDK_WINDOW_STATE_FOCUSED to be set by default we need to set its
master flag by default as well.
https://bugzilla.gnome.org/show_bug.cgi?id=673125
gdk/x11/gdkwindow-x11.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 0a72921..981572d 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -170,7 +170,10 @@ _gdk_x11_window_get_toplevel (GdkWindow *window)
impl = GDK_WINDOW_IMPL_X11 (window->impl);
if (!impl->toplevel)
- impl->toplevel = g_new0 (GdkToplevelX11, 1);
+ {
+ impl->toplevel = g_new0 (GdkToplevelX11, 1);
+ impl->toplevel->have_focused = TRUE;
+ }
return impl->toplevel;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]