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.
This commit is contained in:
Timm Bäder
2017-07-18 12:36:35 +02:00
committed by Matthias Clasen
parent 9bf5def6b7
commit bf22dea2ce
2 changed files with 4 additions and 4 deletions

View File

@@ -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
{

View File

@@ -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;