GNOME Bugzilla – Bug 769070
Always use the default screen
Last modified: 2016-07-23 02:57:40 UTC
We get compile warnings when building against a recent version of gtk+. The patch that will be attached fixes that.
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.
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 ...
(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.
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.
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.
Review of attachment 331964 [details] [review]: LGTM
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.
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