[gtk+/wip/baedert/drawing] GdkWindow: Default to unfocused
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/drawing] GdkWindow: Default to unfocused
- Date: Tue, 18 Jul 2017 11:13:02 +0000 (UTC)
commit a70168d8000d816a28939f2665ae71510ba2d9be
Author: Timm Bäder <mail baedert org>
Date: Tue Jul 18 12:36:35 2017 +0200
GdkWindow: Default to unfocused
Don't set the have_focused field of the window's toplevel to TRUE by
default and don't set the FOCUSED state in gdk_window_map. This a means
toplevel window's state is what the WM expects, and the FOCUSED state
will be set anyway when we map the window and receive a _NET_WM_STATE
message.
gdk/gdkwindow.c | 6 +++---
gdk/x11/gdkwindow-x11.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index cbfbc02..04f488d 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -3585,9 +3585,9 @@ gdk_window_show_internal (GdkWindow *window, gboolean raise)
if (gdk_window_has_impl (window))
{
if (!was_mapped)
- gdk_synthesize_window_state (window,
- GDK_WINDOW_STATE_WITHDRAWN,
- GDK_WINDOW_STATE_FOCUSED);
+ gdk_synthesize_window_state (window,
+ GDK_WINDOW_STATE_WITHDRAWN,
+ 0);
}
else
{
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 2bf01f7..e76f3b5 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -173,7 +173,7 @@ _gdk_x11_window_get_toplevel (GdkWindow *window)
if (!impl->toplevel)
{
impl->toplevel = g_new0 (GdkToplevelX11, 1);
- impl->toplevel->have_focused = TRUE;
+ impl->toplevel->have_focused = FALSE;
}
return impl->toplevel;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]