Hi,

I'm interested in bringing support for true OSX fullscreen windows to GTK+ - standard system decoration in the top right corner of the window, correct Spaces handling, etc.

Still finding my way around everything here, but this is the first atomic part for review: responding to the NSWindowDelegate windowDidEnterFullScreen and windowDidExitFullScreen notifications by synchronizing the GDK_WINDOW_STATE_FULLSCREEN bit, causing the "window-state-event" signal to be sent.

(Apologies if I screwed up the submissions process...)

- Richard
diff --git a/gdk/quartz/GdkQuartzNSWindow.c b/gdk/quartz/GdkQuartzNSWindow.c
index b5eaae2..264b565 100644
--- a/gdk/quartz/GdkQuartzNSWindow.c
+++ b/gdk/quartz/GdkQuartzNSWindow.c
@@ -62,6 +62,18 @@
   gdk_synthesize_window_state (window, GDK_WINDOW_STATE_ICONIFIED, 0);
 }
 
+-(void)windowDidEnterFullScreen:(NSNotification *)aNotification
+{
+    GdkWindow *window = [[self contentView] gdkWindow];
+    gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_FULLSCREEN);
+}
+
+-(void)windowDidExitFullScreen:(NSNotification *)aNotification
+{
+    GdkWindow* window = [[self contentView] gdkWindow];
+    gdk_synthesize_window_state (window, GDK_WINDOW_STATE_FULLSCREEN, 0);
+}
+
 -(void)windowDidBecomeKey:(NSNotification *)aNotification
 {
   GdkWindow *window = [[self contentView] gdkWindow];
_______________________________________________
gtk-devel-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list

Reply via email to