[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: Linux basic application not displaying correctly
From:       Thiago_Milczarek_Sayão <thiago.sayao () gmail ! com>
Date:       2020-12-14 11:45:58
Message-ID: CAAP_wukQh-XrT_+bENaKdZwMwT3MafCUnsiPjjFeSpbi0f44sA () mail ! gmail ! com
[Download RAW message or body]

Hi Chad,

I did not get the issue, please send the screenshots to my e-mail as they
don't get through the list.

One possibility:
The Gtk glass backend tries to follow Windows (as in the operating system)
sizes. On Windows, window sizes are the whole window, including
decorations. On X (Linux) window decorations are a window manager job, so
they don't count to the window size (more logical to me, as decorations can
vary). Gtk backend tries to mimic that by getting decoration sizes. Your
window manager seems to be not sending those.

Cheers.





Em dom., 13 de dez. de 2020 Ã s 16:58, Chad Preisler <chad.preisler@gmail.com>
escreveu:

> Hello,
> I'm running elementaryOS and when I use gtk3 the main window does not
> display correctly. When using gtk2, the main window does display correctly.
>
> Here is the command line to run with gtk2.
>
> java -Djdk.gtk.version=2
> --module-path="/home/chad/javafx/jfx/build/sdk/lib" --add-modules
> javafx.controls,javafx.fxml -jar target/javafxElementaryOS-1.0-SNAPSHOT.jar
>
> Here is the command line to run with gtk3.
>
> java -Djdk.gtk.version=2
> --module-path="/home/chad/javafx/jfx/build/sdk/lib" --add-modules
> javafx.controls,javafx.fxml -jar target/javafxElementaryOS-1.0-SNAPSHOT.jar
>
> I've added two screenshots. Please notice in the gtk3 one that the mouse
> cursor changes inside the window. I can actually change the window size
> from that spot.
>
> I modified glass_window.cpp and added some cout statements to print
> messages. The major difference I see in method
> WindowContextTop::process_configure the frame width and height returned
> from gdk_window_get_frame_extents are bigger in the gtk3 run.
>
> Here is my output from the gtk2 run:
>
> chad@chad-Inspiron-5565:~/NetBeansProjects/javafxElementaryOS$ java
> -Djdk.gtk.version=2 --module-path="/home/chad/javafx/jfx/build/sdk/lib"
> --add-modules javafx.controls,javafx.fxml -jar
> target/javafxElementaryOS-1.0-SNAPSHOT.jar
> Gtk-Message: 13:49:22.237: Failed to load module "canberra-gtk-module"
> Creating main window! POPUP2
> WindowType is not TITLED
> set_bounds
> Frame extents: top 0 left 0 bottom 0 right 0
> geometry_get_window_width 640
> geometry_get_content_width 640
> geometry_get_window_height 513
> geometry_get_content_width 480
> window_configure
> window_configure newWidth 640 newHeight 480
> geometry_get_window_width 640
> geometry_get_window_height 513
> set_bounds
> geometry_get_window_width 640
> geometry_get_window_height 513
> window_configure
> process_configure
> Window is decorated
> frame.width 640 frame.height 480
> Frame x 640 frame y 209
> Frame extents: top 0 left 0 bottom 0 right 0
> geometry_get_window_width 640
> geometry_get_window_height 513
> process_configure
> Window is decorated
> frame.width 640 frame.height 513
> Frame x 640 frame y 209
> Frame extents: top 33 left 0 bottom 0 right 0
> geometry_get_window_width 640
> geometry_get_window_height 513
> process_configure
> Window is decorated
> frame.width 640 frame.height 513
> Frame x 640 frame y 209
> Frame extents: top 33 left 0 bottom 0 right 0
> geometry_get_window_width 640
> geometry_get_window_height 513
> process_configure
> Window is decorated
> frame.width 640 frame.height 513
> Frame x 640 frame y 283
> Frame extents: top 33 left 0 bottom 0 right 0
> geometry_get_window_width 640
> geometry_get_window_height 513
>
> Here is my output from the gtk3 run:
>
> chad@chad-Inspiron-5565:~/NetBeansProjects/javafxElementaryOS$ java
> -Djdk.gtk.version=3 --module-path="/home/chad/javafx/jfx/build/sdk/lib"
> --add-modules javafx.controls,javafx.fxml -jar
> target/javafxElementaryOS-1.0-SNAPSHOT.jar
> Creating main window! POPUP2
> WindowType is not TITLED
> set_bounds
> Frame extents: top 0 left 0 bottom 0 right 0
> geometry_get_window_width 640
> geometry_get_content_width 640
> geometry_get_window_height 513
> geometry_get_content_width 480
> window_configure
> window_configure newWidth 640 newHeight 480
> geometry_get_window_width 640
> geometry_get_window_height 513
> set_bounds
> geometry_get_window_width 640
> geometry_get_window_height 513
> window_configure
> process_configure
> Window is decorated
> frame.width 798 frame.height 671
> Frame x 561 frame y 144
> Frame extents: top 0 left 0 bottom 0 right 0
> geometry_get_window_width 640
> geometry_get_window_height 513
>
> I'm pretty sure this is some issue with the Window manager that
> elemenatryOS uses. Problem is I'm not sure where to go from here. Has
> anyone else experienced this? Any ideas on how to further debug this?
>
> Thanks,
> Chad
> [image: javafx_gtk2.png]
> [image: javafx_gtk3.png]
>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic