RFR: 8320965: Scrolling on a touch enabled display fails on Wayland [v2]

Thiago Milczarek Sayao tsayao at openjdk.org
Mon Dec 18 10:12:53 UTC 2023


On Mon, 18 Dec 2023 09:46:23 GMT, Jose Pereda <jpereda at openjdk.org> wrote:

>> modules/javafx.graphics/src/main/native-glass/gtk/wrapped.c line 197:
>> 
>>> 195:         return TRUE;
>>> 196:     }
>>> 197:     return FALSE;
>> 
>> I did try to test on Ubuntu 16.04 and compilation failed (no surprise because `GdkSeat` does not exists there). Suggestion to keep  `#ifdef` here and `return FALSE` on `#else` so it would still compile on Ubuntu 16.04 and older systems. Will need to `#ifdef` all `GdkSeat` usage.
>
> I take `GdkSeat` is available since GTK 3.0? https://docs.gtk.org/gdk3/class.Seat.html
> 
> But don't we have a minimum set on 3.8.0?
> 
> Would this work?
> 
> #if GTK_CHECK_VERSION(3, 0, 0)
> static GdkSeat * (*_gdk_display_get_default_seat) (GdkDisplay *display);
> GdkSeat * wrapped_gdk_display_get_default_seat (GdkDisplay *display)
> {...}
> #endif
> 
> ...
> 
> #if GTK_CHECK_VERSION(3, 0, 0)
>     GdkSeat* seat = wrapped_gdk_display_get_default_seat(gdk_window_get_display(window));
>     if (seat != NULL && _gdk_seat_grab != NULL) {
>         *status = ...
>         return TRUE;
>     }
> #endif

I think the docs are wrong, I probably exists since 3.20, so maybe check for `GTK_CHECK_VERSION(3, 20, 0);`.


This is the compilation error on Ubuntu 16.04:
`/home/tsayao/jose/jfx/modules/javafx.graphics/src/main/native-glass/gtk/wrapped.c:200:34: error: unknown type name ‘GdkSeat’
`

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1305#discussion_r1429852839


More information about the openjfx-dev mailing list