GNOME Bugzilla – Bug 708284
GnomeRR: refresh the cached view of the screens when mutter restarts
Last modified: 2013-09-18 15:52:15 UTC
Mutter does a modeset when it starts, but doesn't emit signals, so we must refresh our structures when we detect that. But most important, we must ensure that our serial is properly updated, otherwise any further operation will fail with AccessDenied.
Created attachment 255175 [details] [review] GnomeRR: refresh the cached view of the screens when mutter restarts
Review of attachment 255175 [details] [review]: Looks good and works fine here. Please get r-t approval since this prevents g-s-d and g-c-c from doing anything RR related. ::: libgnome-desktop/gnome-rr.c @@ +536,3 @@ diff_outputs_and_emit_signals (screen->priv->info, info); + if (screen->priv->info) This pointer is already dereferenced above so checking for NULL here doesn't make sense
Review of attachment 255175 [details] [review]: ::: libgnome-desktop/gnome-rr.c @@ +516,3 @@ + REFRESH_IGNORE_SERIAL = 1, + REFRESH_FORCE_CALLBACK = 2 +} RefreshFlags; Not sure you really need flags here - you have 3 flags, and only 2 callers... Alternatively, you could just interpret force_callback to mean 'ignore serial' as well. But ok
(In reply to comment #3) > Review of attachment 255175 [details] [review]: > > ::: libgnome-desktop/gnome-rr.c > @@ +516,3 @@ > + REFRESH_IGNORE_SERIAL = 1, > + REFRESH_FORCE_CALLBACK = 2 > +} RefreshFlags; > > Not sure you really need flags here - you have 3 flags, and only 2 callers... > Alternatively, you could just interpret force_callback to mean 'ignore serial' > as well. > > But ok Heh, I was just trying to avoid two booleans (there are 2 flags and 3 callers, btw, so it's 3 combinations used out of 4 possible)
Pushed after r-t approval. Attachment 255175 [details] pushed as b96b8af - GnomeRR: refresh the cached view of the screens when mutter restarts