GNOME Bugzilla – Bug 719790
Mutter should trap and ignore any errors when setting the primary output
Last modified: 2013-12-06 15:49:21 UTC
Created attachment 263409 [details] [review] Trap and ignore the error Some drivers which support RandR 1.4 may not support setting or getting the primary output, therefore mutter should trap and ignore any relevant errors. The modesetting driver exposes this problem when used in combination with the nvidia binary driver using RandR 1.4 offloading. I haven't tried the latest mutter from git, and I've only worked around the issue in gnome-desktop (see https://bugzilla.gnome.org/show_bug.cgi?id=719784, and the downstream bug report https://bugs.launchpad.net/ubuntu/+source/gnome-desktop3/+bug/1224254) but I thought that porting the workaround would be a good thing for mutter too. I wrote the attached patch (just 4 lines of code) using git master.
Review of attachment 263409 [details] [review]: ::: src/core/monitor-xrandr.c @@ +454,3 @@ } + meta_error_trap_push (meta_get_display ()); Could you put: MetaDisplay *display = meta_get_display (); and replace all of the ad-hoc meta_get_display () calls with display?
Created attachment 263674 [details] [review] Trap and ignore the error v2 I didn't do it in the first patch only to keep the changes minimal. Here's the new patch.
Created attachment 263675 [details] [review] Trap and ignore the error v3 Sorry, I forgot to sign it off.
Review of attachment 263675 [details] [review]: Looks good. We don't need a Signed-off-by, but feel free to commit with it.
Ok, I'll push my changes then. Thanks for reviewing my work.
Committed