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 769070 - Always use the default screen
Always use the default screen
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2016-07-22 06:15 UTC by Jonas Ådahl
Modified: 2016-07-23 02:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Always use the default screen (7.46 KB, patch)
2016-07-22 06:15 UTC, Jonas Ådahl
none Details | Review
MetaWindowWayland: Don't set X11 window attributes that'll get ignored (2.06 KB, patch)
2016-07-22 08:11 UTC, Jonas Ådahl
committed Details | Review
Always use the default screen (14.23 KB, patch)
2016-07-22 08:11 UTC, Jonas Ådahl
committed Details | Review

Description Jonas Ådahl 2016-07-22 06:15:22 UTC
We get compile warnings when building against a recent version of gtk+. The patch that will be attached fixes that.
Comment 1 Jonas Ådahl 2016-07-22 06:15:31 UTC
Created attachment 331955 [details] [review]
Always use the default screen

GDK doesn't support multiple screens, so effectively we don't either.
Lets stop pretending we do.

This fixes a few -Wdeprecated warnings.
Comment 2 Florian Müllner 2016-07-22 07:30:32 UTC
Review of attachment 331955 [details] [review]:

::: src/core/screen-private.h
@@ -51,3 @@
   int number;
   char *screen_name;
-  Screen *xscreen;

Still used in meta_window_wayland_new()

::: src/core/screen.c
@@ +645,2 @@
   screen->display = display;
   screen->number = number;

Does it make sense to remove the 'number' parameter here as well and call meta_ui_get_screen_number() instead? It's odd to suggest that MetaScreen could use any screen when in reality things will go really awkward when passed anything other than the number of GDK's default screen ...
Comment 3 Jonas Ådahl 2016-07-22 07:46:46 UTC
(In reply to Florian Müllner from comment #2)
> Review of attachment 331955 [details] [review] [review]:
> 
> ::: src/core/screen-private.h
> @@ -51,3 @@
>    int number;
>    char *screen_name;
> -  Screen *xscreen;
> 
> Still used in meta_window_wayland_new()

Ah, seems I tested this while fixing the doesn't-build-with-wayland-disabled.

> 
> ::: src/core/screen.c
> @@ +645,2 @@
>    screen->display = display;
>    screen->number = number;
> 
> Does it make sense to remove the 'number' parameter here as well and call
> meta_ui_get_screen_number() instead? It's odd to suggest that MetaScreen
> could use any screen when in reality things will go really awkward when
> passed anything other than the number of GDK's default screen ...

Good point.
Comment 4 Jonas Ådahl 2016-07-22 08:11:06 UTC
Created attachment 331964 [details] [review]
MetaWindowWayland: Don't set X11 window attributes that'll get ignored

We only use a handful of the attributes set, so lets stop pretending
that things are initialized for a reason. Eventually we should stop
using XWindowAttributes in the generic MetaWindow creation path.
Comment 5 Jonas Ådahl 2016-07-22 08:11:11 UTC
Created attachment 331965 [details] [review]
Always use the default screen

GDK doesn't support multiple screens, so effectively we don't either.
Lets stop pretending we do.

This fixes a few -Wdeprecated warnings.
Comment 6 Florian Müllner 2016-07-22 09:24:27 UTC
Review of attachment 331964 [details] [review]:

LGTM
Comment 7 Florian Müllner 2016-07-22 09:24:31 UTC
Review of attachment 331965 [details] [review]:

::: src/core/screen.c
@@ -644,2 @@
   screen->display = display;
-  screen->number = number;

Ah, I was thinking of setting screen->number from meta_ui_get_screen_number(), not getting rid of it altogether. But seeing how it's mostly used in debug output where it's not really useful, this works for me as well.
Comment 8 Jonas Ådahl 2016-07-23 02:57:31 UTC
Attachment 331964 [details] pushed as 98cd813 - MetaWindowWayland: Don't set X11 window attributes that'll get ignored
Attachment 331965 [details] pushed as cd225c4 - Always use the default screen