gtk+ r19570 - in branches/gtk-2-12: . gdk/quartz
- From: rhult svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r19570 - in branches/gtk-2-12: . gdk/quartz
- Date: Thu, 14 Feb 2008 21:53:36 +0000 (GMT)
Author: rhult
Date: Thu Feb 14 21:53:36 2008
New Revision: 19570
URL: http://svn.gnome.org/viewvc/gtk+?rev=19570&view=rev
Log:
2008-02-14 Richard Hult <richard imendio com>
Merged from trunk:
* gdk/quartz/gdkwindow-quartz.c: (get_fullscreen_geometry),
(gdk_window_hide), (gdk_window_fullscreen),
(gdk_window_unfullscreen): Make sure we leave fullscreen mode if
the window is hidden.
Modified:
branches/gtk-2-12/ChangeLog
branches/gtk-2-12/gdk/quartz/gdkwindow-quartz.c
Modified: branches/gtk-2-12/gdk/quartz/gdkwindow-quartz.c
==============================================================================
--- branches/gtk-2-12/gdk/quartz/gdkwindow-quartz.c (original)
+++ branches/gtk-2-12/gdk/quartz/gdkwindow-quartz.c Thu Feb 14 21:53:36 2008
@@ -32,8 +32,20 @@
static GSList *main_window_stack;
+#define FULLSCREEN_DATA "fullscreen-data"
+
+typedef struct
+{
+ gint x, y;
+ gint width, height;
+ GdkWMDecoration decor;
+} FullscreenSavedGeometry;
+
+
static void update_toplevel_order (void);
-static void clear_toplevel_order (void);
+static void clear_toplevel_order (void);
+
+static FullscreenSavedGeometry *get_fullscreen_geometry (GdkWindow *window);
#define WINDOW_IS_TOPLEVEL(window) \
(GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD && \
@@ -1065,6 +1077,10 @@
g_return_if_fail (GDK_IS_WINDOW (window));
+ /* Make sure we're not stuck in fullscreen mode. */
+ if (get_fullscreen_geometry (window))
+ ShowMenuBar ();
+
if (GDK_WINDOW_DESTROYED (window))
return;
@@ -2700,14 +2716,11 @@
}
}
-#define FULLSCREEN_DATA "fullscreen-data"
-
-typedef struct
+static FullscreenSavedGeometry *
+get_fullscreen_geometry (GdkWindow *window)
{
- gint x, y;
- gint width, height;
- GdkWMDecoration decor;
-} FullscreenSavedGeometry;
+ return g_object_get_data (G_OBJECT (window), FULLSCREEN_DATA);
+}
void
gdk_window_fullscreen (GdkWindow *window)
@@ -2720,28 +2733,32 @@
g_return_if_fail (GDK_IS_WINDOW (window));
g_return_if_fail (WINDOW_IS_TOPLEVEL (window));
- geometry = g_new (FullscreenSavedGeometry, 1);
+ geometry = get_fullscreen_geometry (window);
+ if (!geometry)
+ {
+ geometry = g_new (FullscreenSavedGeometry, 1);
+
+ geometry->x = private->x;
+ geometry->y = private->y;
+ geometry->width = impl->width;
+ geometry->height = impl->height;
- geometry->x = private->x;
- geometry->y = private->y;
- geometry->width = impl->width;
- geometry->height = impl->height;
-
- if (!gdk_window_get_decorations (window, &geometry->decor))
- geometry->decor = GDK_DECOR_ALL;
-
- g_object_set_data_full (G_OBJECT (window),
- FULLSCREEN_DATA, geometry,
- g_free);
+ if (!gdk_window_get_decorations (window, &geometry->decor))
+ geometry->decor = GDK_DECOR_ALL;
- HideMenuBar ();
+ g_object_set_data_full (G_OBJECT (window),
+ FULLSCREEN_DATA, geometry,
+ g_free);
- gdk_window_set_decorations (window, 0);
+ gdk_window_set_decorations (window, 0);
- frame = [[NSScreen mainScreen] frame];
- move_resize_window_internal (window,
- 0, 0,
- frame.size.width, frame.size.height);
+ frame = [[NSScreen mainScreen] frame];
+ move_resize_window_internal (window,
+ 0, 0,
+ frame.size.width, frame.size.height);
+ }
+
+ HideMenuBar ();
gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_FULLSCREEN);
}
@@ -2754,8 +2771,7 @@
g_return_if_fail (GDK_IS_WINDOW (window));
g_return_if_fail (WINDOW_IS_TOPLEVEL (window));
- geometry = g_object_get_data (G_OBJECT (window), FULLSCREEN_DATA);
-
+ geometry = get_fullscreen_geometry (window);
if (geometry)
{
ShowMenuBar ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]