mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
Discourage server grabs
Server grabs are not as evil as you might expect, but there is agreement in that their usage should be limited. Server grabs can cause things to go rather wrong when mutter emits a signal while it has grabbed the server. If the receiver of that signal waits for a synchronous action performed by another client, then you have a deadlock. This happens with Mali binary GLESv2 drivers :( https://bugzilla.gnome.org/show_bug.cgi?id=721345
This commit is contained in:
parent
2579e48f21
commit
7d1611f666
@ -1224,7 +1224,18 @@ meta_display_screen_for_x_screen (MetaDisplay *display,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Grab/ungrab routines taken from fvwm */
|
/* Grab/ungrab routines taken from fvwm.
|
||||||
|
* Calling this function will cause X to ignore all other clients until
|
||||||
|
* you ungrab. This may not be quite as bad as it sounds, yet there is
|
||||||
|
* agreement that avoiding server grabs except when they are clearly needed
|
||||||
|
* is a good thing.
|
||||||
|
*
|
||||||
|
* If you do use such grabs, please clearly explain the necessity for their
|
||||||
|
* usage in a comment. Try to keep their scope extremely limited. In
|
||||||
|
* particular, try to avoid emitting any signals or notifications while
|
||||||
|
* a grab is active (if the signal receiver tries to block on an X request
|
||||||
|
* from another client at this point, you will have a deadlock).
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
meta_display_grab (MetaDisplay *display)
|
meta_display_grab (MetaDisplay *display)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user