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 708284 - GnomeRR: refresh the cached view of the screens when mutter restarts
GnomeRR: refresh the cached view of the screens when mutter restarts
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: libgnome-desktop
unspecified
Other All
: Normal normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-09-18 12:24 UTC by Giovanni Campagna
Modified: 2013-09-18 15:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GnomeRR: refresh the cached view of the screens when mutter restarts (3.88 KB, patch)
2013-09-18 12:25 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2013-09-18 12:24:58 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.
Comment 1 Giovanni Campagna 2013-09-18 12:25:00 UTC
Created attachment 255175 [details] [review]
GnomeRR: refresh the cached view of the screens when mutter restarts
Comment 2 Rui Matos 2013-09-18 13:39:16 UTC
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
Comment 3 Matthias Clasen 2013-09-18 13:54:56 UTC
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
Comment 4 Giovanni Campagna 2013-09-18 13:56:36 UTC
(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)
Comment 5 Giovanni Campagna 2013-09-18 15:52:11 UTC
Pushed after r-t approval.
Attachment 255175 [details] pushed as b96b8af - GnomeRR: refresh the cached view of the screens when mutter restarts