Re: Different behaviour under Wayland



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

Attachment: tester2.c
Description: Text document



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