Re: GdkScreen size-changed and gdk_monitor_get_workarea problem



Hi Florian,

On 8/11/18 1:41 pm, Florian Müllner wrote:
On Thu, Nov 8, 2018 at 12:35 PM Sebastian Geiger (Lanoxx)
<lanoxx gmx net> wrote:

I was able to resolve the issue yesterday, and found that it was not
directly a Problem of GTK+.

To some extent it is, I don't think its API currently allows what you
are trying to do.

On X11, the WM is a client like your app as far as screen changes are
concerned. It will update the _NET_WORKAREA property in response to
the size change, but I don't see how it would be possible to ensure
that the property is written before the server notifies other clients
about the size change. But let's assume that this was possible and
fixed. It would still be possible for your app to get the wrong work
area, because the area can change without a change in screen size (for
example a dock or panel that is shown or removed).

So if this is something GTK+ wants to support, then I think the best
option would be to emit change notifications for GdkMonitor:workarea.

You are right. I was ignoring the fact that the workarea needs to be
computed by the window manager after the monitor geometry has changed
and of course that cannot happen in the same event cycle as the event
for the monitor change itself.

I am not sure how much overhead it would cause in Gtk to emit change
events for GdkMonitor:workarea and if that is something Gtk wants to
monitor, but if such a notification was added that would certainly be
useful for me.

Thanks for your the explanation.


Cheers,
Florian



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]