After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 655311 - Prevent hiding of unrelated application windows when stage returns from fullscreen
Prevent hiding of unrelated application windows when stage returns from fulls...
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: quartz
git master
Other Mac OS
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2011-07-26 07:08 UTC by Bill Kelly
Modified: 2011-07-29 12:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
osx: Implement windowDidResignKey (2.54 KB, patch)
2011-07-29 12:52 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description Bill Kelly 2011-07-26 07:08:06 UTC
This probably should have been two separate patches.  (Sorry, the author was new to git.)

1. Adds isHiding field to _ClutterStageOSX to allow windowDidResignKey delegate to not order full screen window back whilst the full screen window was being hidden.  This caused other application windows to be hidden (and to remain hidden after full screen mode was exited.)

2. Adds code to keep hidden stage windows from being listed in the application's Windows menu. (Possibly an enhancement rather than a bug fix.)


Patch is here: (accidentally committed .c and .h separately)

https://github.com/spatulasnout/clutter/commit/4e4794933a7cda7232d7f9a693d5da7c978f432b

https://github.com/spatulasnout/clutter/commit/432c62dceb8a0091b94ad926be67904f9f6538d8



commit 4e4794933a7cda7232d7f9a693d5da7c978f432b
Author: Kirk A. Baker <kbaker@camerabits.com>
Date:   Mon Jul 11 21:56:47 2011 -0700

    Added isHiding field to _ClutterStageOSX to allow windowDidResignKey delegate to not order full screen window back whilst the fu

diff --git a/clutter/osx/clutter-stage-osx.c b/clutter/osx/clutter-stage-osx.c
index 26b6091..6754970 100644
--- a/clutter/osx/clutter-stage-osx.c
+++ b/clutter/osx/clutter-stage-osx.c
@@ -111,7 +111,8 @@ clutter_stage_osx_get_wrapper (ClutterStageWindow *stage_window);
   if (self->stage_osx->stage_state & CLUTTER_STAGE_STATE_FULLSCREEN)
     {
       [self setLevel: NSNormalWindowLevel];
-      [self orderBack: nil];
+      if (!self->stage_osx->isHiding)
+        [self orderBack: nil];
     }

   clutter_stage_osx_state_update (self->stage_osx, CLUTTER_STAGE_STATE_ACTIVATED, 0);
@@ -370,6 +371,7 @@ clutter_stage_osx_show (ClutterStageWindow *stage_window,
     [self->window orderFront: nil];

   [self->view setHidden:isViewHidden];
+  [self->window setExcludedFromWindowsMenu:NO];

   /*
    * After hiding we cease to be first responder.
@@ -388,10 +390,14 @@ clutter_stage_osx_hide (ClutterStageWindow *stage_window)

   CLUTTER_NOTE (BACKEND, "[%p] hide", self);

+  self->isHiding = true;
   [self->window orderOut: nil];
+  [self->window setExcludedFromWindowsMenu:YES];

   clutter_actor_unmap (CLUTTER_ACTOR (self->wrapper));

+  self->isHiding = false;
+
   CLUTTER_OSX_POOL_RELEASE();
 }


commit 432c62dceb8a0091b94ad926be67904f9f6538d8
Author: Kirk A. Baker <kbaker@camerabits.com>
Date:   Mon Jul 11 21:56:04 2011 -0700

    Added isHiding field to _ClutterStageOSX to allow windowDidResignKey delegate to not order full screen window back whilst the fu

diff --git a/clutter/osx/clutter-stage-osx.h b/clutter/osx/clutter-stage-osx.h
index af1d7ba..b68f4bd 100644
--- a/clutter/osx/clutter-stage-osx.h
+++ b/clutter/osx/clutter-stage-osx.h
@@ -41,7 +41,7 @@ G_BEGIN_DECLS
 typedef struct _ClutterStageOSX      ClutterStageOSX;
 typedef struct _ClutterStageOSXClass ClutterStageOSXClass;

-@interface ClutterGLWindow : NSWindow
+@interface ClutterGLWindow : NSWindow <NSWindowDelegate>
 {
 @public
   ClutterStageOSX *stage_osx;
@@ -67,6 +67,7 @@ struct _ClutterStageOSX
   ClutterStageState stage_state;

   gboolean acceptFocus;
+  gboolean isHiding;

   gfloat scroll_pos_x;
   gfloat scroll_pos_y;
Comment 1 Emmanuele Bassi (:ebassi) 2011-07-29 12:52:36 UTC
Created attachment 192871 [details] [review]
osx: Implement windowDidResignKey

Added isHiding field to _ClutterStageOSX to allow windowDidResignKey
delegate to not order full screen window back whilst the full screen
window was being hidden.  This caused other application windows to be
hidden.  Also added code to keep hidden stage windows from being listed
in the application's Windows menu.
Comment 2 Emmanuele Bassi (:ebassi) 2011-07-29 12:56:33 UTC
thanks for the patch, it looks good to me. I took the liberty of reformatting the commit message to conform to our own style.
Comment 3 Emmanuele Bassi (:ebassi) 2011-07-29 12:58:42 UTC
Attachment 192871 [details] pushed as e144378 - osx: Implement windowDidResignKey