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 708985 - Mouspointer disappears in Fullscreengames with magnifier enabled
Mouspointer disappears in Fullscreengames with magnifier enabled
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: magnifier
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-09-28 07:53 UTC by chris
Modified: 2014-09-27 14:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Magnifier: Disable unredirect when active (1.17 KB, patch)
2014-01-28 20:10 UTC, Magdalen Berns (irc magpie)
committed Details | Review

Description chris 2013-09-28 07:53:31 UTC
Hi
If the gnome-shell magnifier is enabled -> with zoomlevel 1 ( no magnification) and start a fullscreengame ( via steam Left4death 2 for example, or the opensource rts warzone2100) there is no mousepointer.
if i disable the magnifier, the mousepinter is visible in the game.

reproduce:
1 enable magnifier in the accessiblity settings
2 Zoomlevel = 0; mode=Fullscreen
3 install steam with an fullscreen game (in my case left4death2
4 start the game 


Expect: there is a mousepointer

result: there is no mousepointer
Comment 1 drago01 2013-09-28 18:19:33 UTC
What happens is that while the magnifier is running it draws the cursor and hides the real one. 

When you play a game we unredirect the window to make the game run faster, but that means that the composited cursor will not be displayed.

So what we should do here is:

1) The magnifier should disable unredirection while running
2) Optimize out the case where no magnification is enabled and simpy don't do anything here (leave the cursor alone, leave unredirection enabled).
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-10-02 14:41:35 UTC
How are we magnifying anything anyway if the window is unredirected?
Comment 3 drago01 2013-10-02 14:44:29 UTC
(In reply to comment #2)
> How are we magnifying anything anyway if the window is unredirected?

We don't / can't. So we should not unredirect if we need to magnify.
Comment 4 Magdalen Berns (irc magpie) 2014-01-17 00:10:36 UTC
I could look into disabling unredirection since this is still going but are there other implications for users if this gets done? 

It might also help to know where it gets set in the first place .
Comment 5 drago01 2014-01-17 07:43:22 UTC
(In reply to comment #4)
> I could look into disabling unredirection since this is still going but are
> there other implications for users if this gets done? 

No it is a performance optimization that does not work in that case anyway.

> It might also help to know where it gets set in the first place .

It gets set in mutter basically to allow a fullscreen application to bypass the compositor to avoid an extra copy (and thus run faster).


All you have to do to disable it is to call
Meta.disable_unredirect_for_screen(global.screen) when enabling the magnifier and call Meta.enable_unredirect_for_screen(global.screen) when disabling the magnifier.

In addition to that the magnifier should not be enable if there is no magnification in use see comment 1
Comment 6 Magdalen Berns (irc magpie) 2014-01-18 02:02:53 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > I could look into disabling unredirection since this is still going but are
> > there other implications for users if this gets done? 
> 
> No it is a performance optimization that does not work in that case anyway.
> 
> > It might also help to know where it gets set in the first place .
> 
> It gets set in mutter basically to allow a fullscreen application to bypass the
> compositor to avoid an extra copy (and thus run faster).
> 
> 
> All you have to do to disable it is to call
> Meta.disable_unredirect_for_screen(global.screen) when enabling the magnifier
> and call Meta.enable_unredirect_for_screen(global.screen) when disabling the
> magnifier

Great. Thanks for the instructions. I'll take a look.

> In addition to that the magnifier should not be enable if there is no
> magnification in use see comment 1

If I understand you rightly then this would only work if the code for colour, contrast, perhaps even cross hairs were not reliant on an active magnifier in order to work themselves.

Some people will need those but not the magnifier (like dyslexics for colour tinting, migraine sufferers for example - I'll find that bug and link to it in a sec) so in that case these users would very much want and need to be able to activate the magnifier with zoom level 1 in order to access those settings.

In my view there is a strong argument for having contrast and such activation separate from the magnifier as this means both magnifier and non magnifier users can use it but removes bloat and likely would increase performance for those who are using color/contrast settings via magnifier (the frame rate seems to slow down when the magnifier is on at present). It also means the feature can be advertised as such, rather than being 'just' an extra enhancement for magnifier users to enjoy. 

At the moment I also suspect few non-magnifier users are even aware that the option to adjust the colour and contrast settings is available to them via zoom in control center :-/ which is a real shame. However, I already raised this a few times and it seems the a11y team do not see an advantage to removing control from magnifier.js at all. I think they are very against the idea in fact, but you might prefer to ask them directly to confirm I am interpreting things correctly. 

One compromise could be to implement colour/contrast etc twice in gnome shell and afterwards demonstrate these can be used by the magnifier as they can without it. If GNOME Shell do not mind this then I would be willing and able to implement this, just let me know.
Comment 7 Magdalen Berns (irc magpie) 2014-01-21 00:54:44 UTC
Sorry, I forgot to post links on zoom=1 will try and get a patch in for this bug during the week if I get a chance.

https://bugzilla.gnome.org/show_bug.cgi?id=596386

Matthias Clasen raised the next bug in 2012

https://bugzilla.gnome.org/show_bug.cgi?id=676814.
Comment 8 Magdalen Berns (irc magpie) 2014-01-28 20:10:30 UTC
Created attachment 267437 [details] [review]
Magnifier: Disable unredirect when active

Not sure if this is enough but it seems to make sense.
Comment 9 drago01 2014-02-01 08:31:51 UTC
Review of attachment 267437 [details] [review]:

LG.
Comment 10 drago01 2014-02-01 08:33:08 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > I could look into disabling unredirection since this is still going but are
> > > there other implications for users if this gets done? 
> > 
> > No it is a performance optimization that does not work in that case anyway.
> > 
> > > It might also help to know where it gets set in the first place .
> > 
> > It gets set in mutter basically to allow a fullscreen application to bypass the
> > compositor to avoid an extra copy (and thus run faster).
> > 
> > 
> > All you have to do to disable it is to call
> > Meta.disable_unredirect_for_screen(global.screen) when enabling the magnifier
> > and call Meta.enable_unredirect_for_screen(global.screen) when disabling the
> > magnifier
> 
> Great. Thanks for the instructions. I'll take a look.
> 
> > In addition to that the magnifier should not be enable if there is no
> > magnification in use see comment 1
> 
> If I understand you rightly then this would only work if the code for colour,
> contrast, perhaps even cross hairs were not reliant on an active magnifier in
> order to work themselves.

I mean if none of the features is in use. For instance if you enable the magnifier without any zoom level and none of the other features like contrast etc.
Comment 11 Magdalen Berns (irc magpie) 2014-02-04 15:56:24 UTC
(In reply to comment #10)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > (In reply to comment #4)
> > > > I could look into disabling unredirection since this is still going but are
> > > > there other implications for users if this gets done? 
> > > 
> > > No it is a performance optimization that does not work in that case anyway.
> > > 
> > > > It might also help to know where it gets set in the first place .
> > > 
> > > It gets set in mutter basically to allow a fullscreen application to bypass the
> > > compositor to avoid an extra copy (and thus run faster).
> > > 
> > > 
> > > All you have to do to disable it is to call
> > > Meta.disable_unredirect_for_screen(global.screen) when enabling the magnifier
> > > and call Meta.enable_unredirect_for_screen(global.screen) when disabling the
> > > magnifier
> > 
> > Great. Thanks for the instructions. I'll take a look.
> > 
> > > In addition to that the magnifier should not be enable if there is no
> > > magnification in use see comment 1
> > 
> > If I understand you rightly then this would only work if the code for colour,
> > contrast, perhaps even cross hairs were not reliant on an active magnifier in
> > order to work themselves.
> 
> I mean if none of the features is in use. For instance if you enable the
> magnifier without any zoom level and none of the other features like contrast
> etc.

This sounds like a good idea. I can look into this. 

Thanks for accepting the patch. Unfortunately, I don't have git access yet so I cannot push it myself.
Comment 12 drago01 2014-02-04 15:59:47 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #6)
> > > (In reply to comment #5)
> > > > (In reply to comment #4)
> > > > > I could look into disabling unredirection since this is still going but are
> > > > > there other implications for users if this gets done? 
> > > > 
> > > > No it is a performance optimization that does not work in that case anyway.
> > > > 
> > > > > It might also help to know where it gets set in the first place .
> > > > 
> > > > It gets set in mutter basically to allow a fullscreen application to bypass the
> > > > compositor to avoid an extra copy (and thus run faster).
> > > > 
> > > > 
> > > > All you have to do to disable it is to call
> > > > Meta.disable_unredirect_for_screen(global.screen) when enabling the magnifier
> > > > and call Meta.enable_unredirect_for_screen(global.screen) when disabling the
> > > > magnifier
> > > 
> > > Great. Thanks for the instructions. I'll take a look.
> > > 
> > > > In addition to that the magnifier should not be enable if there is no
> > > > magnification in use see comment 1
> > > 
> > > If I understand you rightly then this would only work if the code for colour,
> > > contrast, perhaps even cross hairs were not reliant on an active magnifier in
> > > order to work themselves.
> > 
> > I mean if none of the features is in use. For instance if you enable the
> > magnifier without any zoom level and none of the other features like contrast
> > etc.
> 
> This sounds like a good idea. I can look into this. 

OK.

> Thanks for accepting the patch. Unfortunately, I don't have git access yet so I
> cannot push it myself.

Pushed it. How often did I (we) ask you to apply for an account? Maybe it is about time to do it? ;)
Comment 13 Magdalen Berns (irc magpie) 2014-02-04 16:10:25 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > (In reply to comment #10)
> > > (In reply to comment #6)
> > > > (In reply to comment #5)
> > > > > (In reply to comment #4)
> > > > > > I could look into disabling unredirection since this is still going but are
> > > > > > there other implications for users if this gets done? 
> > > > > 
> > > > > No it is a performance optimization that does not work in that case anyway.
> > > > > 
> > > > > > It might also help to know where it gets set in the first place .
> > > > > 
> > > > > It gets set in mutter basically to allow a fullscreen application to bypass the
> > > > > compositor to avoid an extra copy (and thus run faster).
> > > > > 
> > > > > 
> > > > > All you have to do to disable it is to call
> > > > > Meta.disable_unredirect_for_screen(global.screen) when enabling the magnifier
> > > > > and call Meta.enable_unredirect_for_screen(global.screen) when disabling the
> > > > > magnifier
> > > > 
> > > > Great. Thanks for the instructions. I'll take a look.
> > > > 
> > > > > In addition to that the magnifier should not be enable if there is no
> > > > > magnification in use see comment 1
> > > > 
> > > > If I understand you rightly then this would only work if the code for colour,
> > > > contrast, perhaps even cross hairs were not reliant on an active magnifier in
> > > > order to work themselves.
> > > 
> > > I mean if none of the features is in use. For instance if you enable the
> > > magnifier without any zoom level and none of the other features like contrast
> > > etc.
> > 
> > This sounds like a good idea. I can look into this. 
> 
> OK.
> 
> > Thanks for accepting the patch. Unfortunately, I don't have git access yet so I
> > cannot push it myself.
> 
> Pushed it. How often did I (we) ask you to apply for an account? Maybe it is
> about time to do it? ;)

Yes, my fault sorry! I will get on it this week, I promise! Thanks again :-)
Comment 14 Magdalen Berns (irc magpie) 2014-03-05 06:18:33 UTC
Should this be closed now?
Comment 15 chris 2014-09-27 14:13:47 UTC
sorry for the late response :).
>Should this be closed now?
yes works like a charm. Many thx :)!