GNOME Bugzilla – Bug 735283
gdkwindow-quartz: Support native fullscreen mode
Last modified: 2014-08-25 10:55:05 UTC
Created attachment 284290 [details] [review] gdkwindow-quartz: Support native fullscreen mode This implements native fullscreen mode on OS X >= 10.7. This patch adds tracking of the fullscreen mode if externally modified, as well as toggling the native fullscreen mode of the window as needed.
Review of attachment 284290 [details] [review]: First round of nitpicks :) ::: gdk/quartz/GdkQuartzNSWindow.c @@ +664,3 @@ + [super setStyleMask:styleMask]; + + isfullscreen = (([self styleMask] & NSFullScreenWindowMask) != 0); same as for gedit I'd say is_fullscreen @@ +666,3 @@ + isfullscreen = (([self styleMask] & NSFullScreenWindowMask) != 0); + + if (wasfullscreen != isfullscreen) was_fullscreen ::: gdk/quartz/gdkwindow-quartz.c @@ +2661,3 @@ + GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl); + return ([impl->toplevel styleMask] & NSFullScreenWindowMask) != 0; +} empty line @@ +2695,3 @@ +_gdk_quartz_window_update_fullscreen_state (GdkWindow *window) +{ + gboolean isfullscreen; same as in the other part
Created attachment 284291 [details] [review] gdkwindow-quartz: Support native fullscreen mode This implements native fullscreen mode on OS X >= 10.7. This patch adds tracking of the fullscreen mode if externally modified, as well as toggling the native fullscreen mode of the window as needed.
Review of attachment 284291 [details] [review]: there are lots of whitespace changes; care to avoid them? it makes reviewing the patch more complicated. it looks generally okay to me, but I can't currently test it. ::: gdk/quartz/gdkwindow-quartz.c @@ +2654,3 @@ } +#ifdef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER I don't particularly like redefining whole functions; can't these go into the bodies of each existing function?
(In reply to comment #3) > Review of attachment 284291 [details] [review]: > > there are lots of whitespace changes; care to avoid them? it makes reviewing > the patch more complicated. Sorry about that, that was unintentional (the first patch didn't have those I think). Will fix. > ::: gdk/quartz/gdkwindow-quartz.c > @@ +2654,3 @@ > } > > +#ifdef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER > > I don't particularly like redefining whole functions; can't these go into the > bodies of each existing function? I did it mostly to avoid having another ifdef for the get_fullscreen_geometry function declaration. But I can split it out.
Created attachment 284293 [details] [review] gdkwindow-quartz: Support native fullscreen mode This implements native fullscreen mode on OS X >= 10.7. This patch adds tracking of the fullscreen mode if externally modified, as well as toggling the native fullscreen mode of the window as needed. - Removed whitespace changes - Simplify non-native force unfullscreen on hide
Review of attachment 284293 [details] [review]: looks okay, and I assume you tested it.
Comment on attachment 284293 [details] [review] gdkwindow-quartz: Support native fullscreen mode Thanks for the review!