On Wed, 13 Feb 2019 at 14:55, Peter Weber via gtkmm-list <
[email protected]> wrote:

> Glib::RefPtr<Gdk::Monitor> primary_monitor =
> window->get_screen()->get_display()->get_primary_monitor();
> if (primary_monitor) {
>     Gdk::Rectangle monitor_size;
>     primary_monitor->get_geometry(monitor_size);
>     // adapt size
>     width = monitor_size.get_width() / 1.8;
>     height = monitor_size.get_height() / 2;
> }
>
> This works on X11 and Windows, but not on Wayland! I've get a nullptr and
> the defaults for width/height are used instead.
>


See https://gitlab.gnome.org/GNOME/gtk/issues/1028 "No monitor reported as
primary by GDK under Wayland"
_______________________________________________
gtkmm-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to