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 655306 - Added windowDidChangeScreen delegate to fix pick errors when window moved to different screen
Added windowDidChangeScreen delegate to fix pick errors when window moved to ...
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: quartz
git master
Other Mac OS
: High critical
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2011-07-26 06:18 UTC by Bill Kelly
Modified: 2011-07-29 12:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
osx: Add windowDidChangeScreen delegate (1.10 KB, patch)
2011-07-29 12:53 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description Bill Kelly 2011-07-26 06:18:02 UTC
Added -windowDidChangeScreen: delegate to handle condition where moving host window to a different screen would cause pick errors to be output.  The delegate just causes the stage to be redrawn which re-creates the pick buffer.


Patch is here:
https://github.com/spatulasnout/clutter/commit/7466e2e17a4ff2326769c1f1cbf1c6c651098c7c


commit 7466e2e17a4ff2326769c1f1cbf1c6c651098c7c
Author: Kirk A. Baker <kbaker@camerabits.com>
Date:   Mon Jul 25 15:02:46 2011 -0700

    Added -windowDidChangeScreen: delegate to handle condition where moving host window to a different screen would cause pick error

diff --git a/clutter/osx/clutter-stage-osx.c b/clutter/osx/clutter-stage-osx.c
index cc80e02..999520c 100644
--- a/clutter/osx/clutter-stage-osx.c
+++ b/clutter/osx/clutter-stage-osx.c
@@ -132,6 +132,11 @@ clutter_stage_osx_get_wrapper (ClutterStageWindow *stage_window);
   else
     return [self frame].size;
 }
+
+- (void)windowDidChangeScreen:(NSNotification *)notification
+{
+  clutter_redraw(CLUTTER_STAGE(self->stage_osx->wrapper));
+}
 @end

 /*************************************************************************/
Comment 1 Emmanuele Bassi (:ebassi) 2011-07-29 12:53:29 UTC
Created attachment 192874 [details] [review]
osx: Add windowDidChangeScreen delegate

Added -windowDidChangeScreen: delegate to handle condition where moving
host window to a different screen would cause pick errors to be output.
The delegate just causes the stage to be redrawn which re-creates the
pick buffer.
Comment 2 Emmanuele Bassi (:ebassi) 2011-07-29 12:54:49 UTC
thanks for the patch, it looks good to me. I took the liberty of reformatting the commit message to conform with our rules.
Comment 3 Emmanuele Bassi (:ebassi) 2011-07-29 12:58:35 UTC
Attachment 192874 [details] pushed as 6f6b27f - osx: Add windowDidChangeScreen delegate