Commit 43f1b5ab authored by Rui Matos's avatar Rui Matos
Browse files

gdk: Add GDK_WINDOW_STATE_FOCUSED to GdkWindowState

This state means that the toplevel window is presented as focused to the user,
i.e with active decorations under an X11 window manager.

If the GDK backend doesn't implement this flag, it will just remain set after
mapping the window.

https://bugzilla.gnome.org/show_bug.cgi?id=661428
parent c1e8e7ba
......@@ -371,6 +371,7 @@ typedef enum
* decorations.
* @GDK_WINDOW_STATE_ABOVE: the window is kept above other windows.
* @GDK_WINDOW_STATE_BELOW: the window is kept below other windows.
* @GDK_WINDOW_STATE_FOCUSED: the window is presented as focused (with active decorations).
*
* Specifies the state of a toplevel window.
*/
......@@ -382,7 +383,8 @@ typedef enum
GDK_WINDOW_STATE_STICKY = 1 << 3,
GDK_WINDOW_STATE_FULLSCREEN = 1 << 4,
GDK_WINDOW_STATE_ABOVE = 1 << 5,
GDK_WINDOW_STATE_BELOW = 1 << 6
GDK_WINDOW_STATE_BELOW = 1 << 6,
GDK_WINDOW_STATE_FOCUSED = 1 << 7
} GdkWindowState;
/**
......
......@@ -5184,7 +5184,7 @@ gdk_window_show_internal (GdkWindow *window, gboolean raise)
if (!was_mapped)
gdk_synthesize_window_state (window,
GDK_WINDOW_STATE_WITHDRAWN,
0);
GDK_WINDOW_STATE_FOCUSED);
}
else
{
......
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