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 705573 - display: merge the wip/wayland-display branch
display: merge the wip/wayland-display branch
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Display
unspecified
Other All
: Normal normal
: ---
Assigned To: Debarshi Ray
Control-Center Maintainers
wayland
Depends on: 705510
Blocks:
 
 
Reported: 2013-08-06 15:02 UTC by Giovanni Campagna
Modified: 2013-08-19 07:58 UTC
See Also:
GNOME target: 3.10
GNOME version: ---


Attachments
Adapt to GnomeRR DBus rewrite (9.82 KB, patch)
2013-08-06 15:02 UTC, Giovanni Campagna
accepted-commit_now Details | Review
CcRRLabeler: don't crash when not running under X (3.50 KB, patch)
2013-08-06 15:04 UTC, Giovanni Campagna
needs-work Details | Review
display: adapt to the new model for display configuration (6.23 KB, patch)
2013-08-08 12:26 UTC, Giovanni Campagna
committed Details | Review
wacom: adapt to GnomeRR API changes (4.21 KB, patch)
2013-08-08 12:26 UTC, Giovanni Campagna
committed Details | Review
CcRRLabeler: don't crash when not running under X (3.50 KB, patch)
2013-08-08 12:26 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2013-08-06 15:02:48 UTC
See patches. And discussion from guadec.
Comment 1 Giovanni Campagna 2013-08-06 15:02:54 UTC
Created attachment 250981 [details] [review]
Adapt to GnomeRR DBus rewrite

A number of APIs were changed to adapt GnomeRR to the new
mutter DBus API.
Comment 2 Giovanni Campagna 2013-08-06 15:04:29 UTC
Created attachment 250982 [details] [review]
CcRRLabeler: don't crash when not running under X

If running under wayland, we can't use an X property notify
to look at workarea changes.
Currently, workarea is not part of the wayland protocol, so don't
bother and just don't crash.
Comment 3 Bastien Nocera 2013-08-07 09:39:14 UTC
Review of attachment 250981 [details] [review]:

Separate patches for the 2 panels please.

Rest looks great.
Comment 4 Bastien Nocera 2013-08-07 09:42:13 UTC
Review of attachment 250982 [details] [review]:

::: panels/display/cc-rr-labeler.c
@@ +53,1 @@
 	Atom        workarea_atom;

Do we have an equivalent to this in Wayland? How do we avoid covering the panels?

I think this code should be made to use gdk_screen_get_monitor_workarea() and recheck the values every time the screen configuration changes. That would make it work automatically on Wayland once we implement it in GTK+/gdk.
Comment 5 Giovanni Campagna 2013-08-07 10:20:33 UTC
(In reply to comment #4)
> Review of attachment 250982 [details] [review]:
> 
> ::: panels/display/cc-rr-labeler.c
> @@ +53,1 @@
>      Atom        workarea_atom;
> 
> Do we have an equivalent to this in Wayland? How do we avoid covering the
> panels?
> 
> I think this code should be made to use gdk_screen_get_monitor_workarea() and
> recheck the values every time the screen configuration changes. That would make
> it work automatically on Wayland once we implement it in GTK+/gdk.

There is no workarea in wl_shell (wayland 1.12), but there might be in xdg_shell or in gnome_shell (wayland 1.14+?), so it doesn't really matter right now
On the other hand, in X the workarea can change without XRandR changes, for example if you open a dock or panel.
Comment 6 Bastien Nocera 2013-08-07 10:26:37 UTC
I think that replacing that code with GDK code is "good enough" for GNOME, and means that we'll be able to add Wayland support to the toolkit once something is figured out.
Comment 7 Giovanni Campagna 2013-08-08 12:19:39 UTC
(In reply to comment #6)
> I think that replacing that code with GDK code is "good enough" for GNOME, and
> means that we'll be able to add Wayland support to the toolkit once something
> is figured out.

The patch still uses get_monitor_workarea(), and that's as much GDK as we can get, I think.
Comment 8 Giovanni Campagna 2013-08-08 12:26:21 UTC
Created attachment 251150 [details] [review]
display: adapt to the new model for display configuration

The way we apply the new configuration changed, in that we are
expected to call the apply() method of GnomeRRConfig ourselves,
and that takes care to call to mutter, show the confirmation
dialog, etc.
Comment 9 Giovanni Campagna 2013-08-08 12:26:26 UTC
Created attachment 251151 [details] [review]
wacom: adapt to GnomeRR API changes

GnomeRR now returns the EDID IDs as strings directly, so we don't
need to convert them to compare to the settings. Also, we don't
need to filter disconnected outputs, it's done by mutter now.
Comment 10 Giovanni Campagna 2013-08-08 12:26:49 UTC
Created attachment 251152 [details] [review]
CcRRLabeler: don't crash when not running under X

If running under wayland, we can't use an X property notify
to look at workarea changes.
Currently, workarea is not part of the wayland protocol, so don't
bother and just don't crash.
Comment 11 Bastien Nocera 2013-08-08 13:56:31 UTC
Review of attachment 251150 [details] [review]:

Looks good otherwise.

::: panels/display/cc-display-panel.c
@@ +2320,2 @@
+  error = NULL;
+  gnome_rr_config_apply_persistent (self->priv->current_configuration,

That should be giving you back a retval.

@@ +2324,1 @@
+  if (error)

if (!retval)
...
Comment 12 Bastien Nocera 2013-08-08 13:56:53 UTC
Review of attachment 251151 [details] [review]:

++
Comment 13 Bastien Nocera 2013-08-08 13:57:15 UTC
Review of attachment 251152 [details] [review]:

Fine then.
Comment 14 Giovanni Campagna 2013-08-19 07:58:25 UTC
Attachment 251150 [details] pushed as 150466c - display: adapt to the new model for display configuration
Attachment 251151 [details] pushed as 77c72eb - wacom: adapt to GnomeRR API changes
Attachment 251152 [details] pushed as 4c85135 - CcRRLabeler: don't crash when not running under X