Re: Different behaviour under Wayland
- Date: Sun, 22 Jan 2017 20:20:40 +0000
- From: Ron Yorston <rmy@xxxxxxxxxxxx>
- Subject: Re: Different behaviour under Wayland
Emmanuele Bassi wrote:
>a window under Wayland also includes its own decorations; the amount
>of space requested by those decorations are usually accounted for by
>the GtkWindow API, as the GtkWindow widget knows about its internal
>children, whereas GtkWidget API doesn't.
The natural size of the sample program is 750x600, since the only thing
that has any size is the drawing area. Under Wayland, though, the size
is 802x652. I can see that the window decorations might add 52 pixels
to the height, but why is the width also 52 pixels bigger?
>Now, the actual question is: what is it that you're trying to achieve?
I want my application to fit neatly on the screen. (The real program
has other widgets and needs to fit alongside other programs. The sample
program was just the simplest one that would illustrate the effect.)
To achieve that under X11 I adjusted the size of the drawing area.
Of course the chosen size is only appropriate for my monitor and for
the default window decorations in Fedora 25, but I can live with that.
When I tried using the application under Wayland it was too big. 52
pixels wider and 52 pixels taller than under X11. The application
hasn't changed and the window decorations are the same size but the
application window has a different default size (and it can still be
reduced in size manually).
It's as if the decorations are being counted twice. It appears that the
application widgets inside the shell (i.e. excluding the decorations)
are being sized to 802x652 pixels when their natural size is 750x600.
>If you want to save your window's size in order to restore it later,
>then you should read this wiki page:
No, that's not what I want to do.
gtk-list mailing list