[gtk+] gdk: Add GDK_WINDOW_STATE_FOCUSED to GdkWindowState
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gdk: Add GDK_WINDOW_STATE_FOCUSED to GdkWindowState
- Date: Tue, 8 Nov 2011 20:04:07 +0000 (UTC)
commit 43f1b5abbc83483c8554239adf8b42f218c11adf
Author: Rui Matos <tiagomatos gmail com>
Date: Fri Oct 28 23:21:04 2011 +0100
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
gdk/gdkevents.h | 4 +++-
gdk/gdkwindow.c | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gdk/gdkevents.h b/gdk/gdkevents.h
index 24a3b8e..a1baac1 100644
--- a/gdk/gdkevents.h
+++ b/gdk/gdkevents.h
@@ -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;
/**
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index e2966e2..e47b7f2 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -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
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]