[gtk+] quartz: ensure window being (un)fullscreened is visible
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] quartz: ensure window being (un)fullscreened is visible
- Date: Thu, 17 Jan 2013 13:50:34 +0000 (UTC)
commit 5162751f6c10dc65dac595d513a11f03c897b7f9
Author: Kristian Rietveld <kris loopnest org>
Date: Fri Dec 28 21:04:09 2012 +0100
quartz: ensure window being (un)fullscreened is visible
Patch by Paul Davis; part of bug 669808.
(cherry picked from commit 62f1d871b70a8e08b899942827386d6f3222c986)
gdk/quartz/gdkwindow-quartz.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index b1bcc48..106a46b 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -2840,6 +2840,7 @@ static void
gdk_quartz_window_fullscreen (GdkWindow *window)
{
FullscreenSavedGeometry *geometry;
+ GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
NSRect frame;
if (GDK_WINDOW_DESTROYED (window) ||
@@ -2865,10 +2866,14 @@ gdk_quartz_window_fullscreen (GdkWindow *window)
gdk_window_set_decorations (window, 0);
- frame = [[NSScreen mainScreen] frame];
+ frame = [[impl->toplevel screen] frame];
move_resize_window_internal (window,
0, 0,
frame.size.width, frame.size.height);
+ [impl->toplevel setContentSize:frame.size];
+ [impl->toplevel makeKeyAndOrderFront:impl->toplevel];
+
+ clear_toplevel_order ();
}
SetSystemUIMode (kUIModeAllHidden, kUIOptionAutoShowMenuBar);
@@ -2879,6 +2884,7 @@ gdk_quartz_window_fullscreen (GdkWindow *window)
static void
gdk_quartz_window_unfullscreen (GdkWindow *window)
{
+ GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
FullscreenSavedGeometry *geometry;
if (GDK_WINDOW_DESTROYED (window) ||
@@ -2900,6 +2906,9 @@ gdk_quartz_window_unfullscreen (GdkWindow *window)
g_object_set_data (G_OBJECT (window), FULLSCREEN_DATA, NULL);
+ [impl->toplevel makeKeyAndOrderFront:impl->toplevel];
+ clear_toplevel_order ();
+
gdk_synthesize_window_state (window, GDK_WINDOW_STATE_FULLSCREEN, 0);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]