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 683073 - Fix (and fix up) the magnifier
Fix (and fix up) the magnifier
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: magnifier
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-08-31 00:40 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2013-12-04 18:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
windowManager: Disable the window dimmer when we close all attached dialogs (3.25 KB, patch)
2012-08-31 00:40 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
js: Fix up for Clutter.Color changes (2.51 KB, patch)
2012-08-31 00:40 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
magnifier: Use PointerWatcher to poll the mouse pointer (1.83 KB, patch)
2012-08-31 00:40 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
magnifier: Round the uiGroup to integer positions (916 bytes, patch)
2012-08-31 00:40 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
magnifier: Don't set the size of the uiGroup (1.32 KB, patch)
2012-08-31 00:40 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
magnifier: Don't use some deprecated APIs (3.98 KB, patch)
2012-08-31 00:40 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
windowManager: Disable the window dimmer when we close all attached dialogs (2.98 KB, patch)
2012-08-31 19:43 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2012-08-31 00:40:15 UTC
The magnifier has been lagging behind and broke for various reasons.
Let's fix these things up.
Comment 1 Jasper St. Pierre (not reading bugmail) 2012-08-31 00:40:19 UTC
Created attachment 223004 [details] [review]
windowManager: Disable the window dimmer when we close all attached dialogs

This saves some GLSL resources and an FBO.
Comment 2 Jasper St. Pierre (not reading bugmail) 2012-08-31 00:40:22 UTC
Created attachment 223005 [details] [review]
js: Fix up for Clutter.Color changes

Spotted by darkxst on IRC.
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-08-31 00:40:25 UTC
Created attachment 223006 [details] [review]
magnifier: Use PointerWatcher to poll the mouse pointer

This gives us a more efficient method to watch the mouse pointer.
Comment 4 Jasper St. Pierre (not reading bugmail) 2012-08-31 00:40:28 UTC
Created attachment 223007 [details] [review]
magnifier: Round the uiGroup to integer positions

This removes the jaggies from text, and other sorts of things.
Comment 5 Jasper St. Pierre (not reading bugmail) 2012-08-31 00:40:33 UTC
Created attachment 223008 [details] [review]
magnifier: Don't set the size of the uiGroup

The magnifier shouldn't mess with global properties like this.
Comment 6 Jasper St. Pierre (not reading bugmail) 2012-08-31 00:40:36 UTC
Created attachment 223009 [details] [review]
magnifier: Don't use some deprecated APIs

Stop using Clutter.Group and Clutter.Rectangle.
Comment 7 Giovanni Campagna 2012-08-31 10:11:26 UTC
Review of attachment 223004 [details] [review]:

I don't like this "policy enabled" thing: if the attached-modal-dialog is false, we can set the effect to disabled like previous code did.
Then, when the undimming animation ends, the effect is set to disabled again.
Comment 8 Giovanni Campagna 2012-08-31 10:13:21 UTC
Review of attachment 223005 [details] [review]:

Uhm, this is an API break.
I wonder if it should be fixed in clutter instead: if they wanted the constructor behaviour, they should have added "new_from_string" / "new_from_pixel".

Fine for the shell, if clutter doesn't change.
Comment 9 Giovanni Campagna 2012-08-31 10:14:52 UTC
Review of attachment 223006 [details] [review]:

We really need to do better than this, for pointer tracking...
Comment 10 Giovanni Campagna 2012-08-31 10:15:11 UTC
Review of attachment 223007 [details] [review]:

Sure
Comment 11 Giovanni Campagna 2012-08-31 10:18:35 UTC
Review of attachment 223008 [details] [review]:

Makes sense, now that the uiGroup is forced to take the size of the screen by get_preferred_* overrides.
Comment 12 Giovanni Campagna 2012-08-31 10:20:50 UTC
Review of attachment 223009 [details] [review]:

::: js/ui/magnifier.js
@@ +1085,3 @@
         // out of view (don't want to see desktop showing through).
+        this._background = new Clutter.Actor({ background_color: Main.DEFAULT_BACKGROUND_COLOR });
+        this._background.set_size(global.screen_width, global.screen_height);

new Clutter.Actor({ width: ...,
                    height: ...,
                    background_color: ... });

@@ +1455,3 @@
      */
     setColor: function(clutterColor) {
+        this._horizLeftHair.set_background_color(clutterColor);

this._horizLeftHair.background_color = ...
Comment 13 Jasper St. Pierre (not reading bugmail) 2012-08-31 16:48:10 UTC
Review of attachment 223005 [details] [review]:

Technically, it's not an API break for Clutter. It's an API break for gobject-introspection.

http://git.gnome.org/browse/gobject-introspection/commit/giscanner/maintransformer.py?id=b0b4c98b31a23e6885b6c0785df93404b161b4b7
Comment 14 Giovanni Campagna 2012-08-31 16:50:11 UTC
(In reply to comment #13)
> Review of attachment 223005 [details] [review]:
> 
> Technically, it's not an API break for Clutter. It's an API break for
> gobject-introspection.
> 
> http://git.gnome.org/browse/gobject-introspection/commit/giscanner/maintransformer.py?id=b0b4c98b31a23e6885b6c0785df93404b161b4b7

Ah. I thought it was because of the new (constructor) annotations.
Comment 15 Jasper St. Pierre (not reading bugmail) 2012-08-31 19:43:12 UTC
Created attachment 223098 [details] [review]
windowManager: Disable the window dimmer when we close all attached dialogs

This saves some GLSL resources and an FBO.
Comment 16 Jasper St. Pierre (not reading bugmail) 2012-08-31 19:43:33 UTC
How about something like this?
Comment 17 Jasper St. Pierre (not reading bugmail) 2012-08-31 19:44:29 UTC
Attachment 223005 [details] pushed as e616877 - js: Fix up for Clutter.Color changes
Attachment 223006 [details] pushed as 8aed511 - magnifier: Use PointerWatcher to poll the mouse pointer
Attachment 223007 [details] pushed as 3fd0502 - magnifier: Round the uiGroup to integer positions
Attachment 223008 [details] pushed as 54e5ffc - magnifier: Don't set the size of the uiGroup
Attachment 223009 [details] pushed as c815979 - magnifier: Don't use some deprecated APIs


Pushed all the other fixes with the suggested changes.
Comment 18 Giovanni Campagna 2012-08-31 19:46:23 UTC
Review of attachment 223098 [details] [review]:

This is not what I had in mind, but it works.
Comment 19 Jasper St. Pierre (not reading bugmail) 2012-08-31 19:47:51 UTC
Attachment 223098 [details] pushed as f8805e8 - windowManager: Disable the window dimmer when we close all attached dialogs


I'm sort of curious what you had in mind, but whatever.