[clutter] osx: Implement windowDidResignKey
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] osx: Implement windowDidResignKey
- Date: Fri, 29 Jul 2011 12:58:35 +0000 (UTC)
commit e144378f5af09eba7adc9a851c4159868f71cea8
Author: Kirk A. Baker <kbaker camerabits com>
Date: Mon Jul 11 21:56:04 2011 -0700
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.
https://bugzilla.gnome.org/show_bug.cgi?id=655311
clutter/osx/clutter-stage-osx.c | 8 +++++++-
clutter/osx/clutter-stage-osx.h | 3 ++-
2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/clutter/osx/clutter-stage-osx.c b/clutter/osx/clutter-stage-osx.c
index 9e602e5..fb6a094 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);
@@ -396,6 +397,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.
@@ -414,10 +416,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();
}
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]