Re: Different behaviour under Wayland

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

 



Hi;

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.

Now, the actual question is: what is it that you're trying to achieve?

If you want to save your window's size in order to restore it later,
then you should read this wiki page:
https://wiki.gnome.org/HowDoI/SaveWindowState

Ciao,
 Emmanuele.


On 22 January 2017 at 15:46, Ron Yorston <rmy@xxxxxxxxxxxx> wrote:
> I wrote:
>>Firstly, when run under Wayland the application has a size slightly
>>greater than its natural size.  That is, I am able to reduce its size
>>manually.  Under X11 the application appears at its natural size and
>>can only be made bigger manually.
>
> I've looked into this further, new program attached.  It appears
> that under Wayland the natural size of the widget (determined by
> gtk_widget_get_preferred_size) is 52 pixels larger than under X11:
>
>    $ ./tester
>    window default size -1 -1
>    widget min size 802 652   widget natural size 802 652
>    $ GDK_BACKEND=x11 ./tester
>    window default size -1 -1
>    widget min size 750 600   widget natural size 750 600
>
> Under Wayland the window is larger when realised but it can be reduced
> manually to the same size as under X11.
>
> Adding an argument to the command changes the default size of the window
> by calling:
>
>    gtk_window_set_default_size(GTK_WINDOW(shell), 0, 0);
>
> This reports:
>
>    $ ./tester bodge
>    window default size 1 1
>    widget min size 802 652   widget natural size 802 652
>    $ GDK_BACKEND=x11 ./tester bodge
>    window default size 1 1
>    widget min size 750 600   widget natural size 750 600
>
> The natural sizes are unchanged but, surprisingly, in Wayland the window
> is now realised at the same size as in X11.
>
> Ron
>
> _______________________________________________
> gtk-list mailing list
> gtk-list@xxxxxxxxx
> https://mail.gnome.org/mailman/listinfo/gtk-list
>



-- 
https://www.bassi.io
[@] ebassi [@gmail.com]
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list



[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux