For several reasons I need to get the number of monitors connected to the system, its physical resolution, the scale, and the work area available.
I found that gdk_display_get_n_monitors() returns the first value, and with that I have access to the GdkMonitor object, which returns all the other information. All this seems to work both under X11 and Wayland, with the exception of the working area, which is only returned correctly under X11.
So my questions are:
is there a way of getting the right working area under Wayland?
are all these calls “future proof” for Wayland? (I mean: is this really allowed under Wayland, and not something that works today but in a future will/could be removed?)
And, of course, the same for the signals that notify that a monitor has been added/removed, or the resolution has changed.