From maxim.kartashev at jetbrains.com Fri Sep 2 13:14:26 2022 From: maxim.kartashev at jetbrains.com (Maxim Kartashev) Date: Fri, 2 Sep 2022 16:14:26 +0300 Subject: How to learn the number of mouse buttons from Wayland? Message-ID: Java has an API that is supposed to return the number of buttons of the mouse - MouseInfo.getNumberOfButtons() . I wonder if it's possible to learn this number from Wayland somehow? The protocol seems to not put any cap on the value of the button code in the corresponding event. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jadahl at redhat.com Fri Sep 2 14:11:44 2022 From: jadahl at redhat.com (Jonas =?iso-8859-1?Q?=C5dahl?=) Date: Fri, 2 Sep 2022 16:11:44 +0200 Subject: How to learn the number of mouse buttons from Wayland? In-Reply-To: References: Message-ID: On Fri, Sep 02, 2022 at 04:14:26PM +0300, Maxim Kartashev wrote: > Java has an API that is supposed to return the number of buttons of the > mouse - MouseInfo.getNumberOfButtons() > . > I wonder if it's possible to learn this number from Wayland somehow? The > protocol seems to not put any cap on the value of the button code in the > corresponding event. This information is currently not exposed via Wayland. What is exposed is a single abstracted "pointer" device for all combined pointing devices, including touchpads, traditional mouse devices, track points, and so on. It also doesn't expose current active global state to anyone wanting to query it, as pointer state is sent via events in response to focus changes or pointer movements, and are localized to surface local coordinates for the surface that currently has pointer focus. It appears that MouseInfo.getNumberOfButtons(), as well as PointerInfo.getDevice() and PointerInfo.getLocation() have no existing way to be implemented. Note that Wayland's approach to input events make this "hard" by design, as the intention is that clients react to abstracted high level localized input events only when they have active focus, to avoid leaking otherwise potentially sensitive information to clients not currently being actively used. Jonas From maxim.kartashev at jetbrains.com Fri Sep 2 14:52:26 2022 From: maxim.kartashev at jetbrains.com (Maxim Kartashev) Date: Fri, 2 Sep 2022 17:52:26 +0300 Subject: How to learn the number of mouse buttons from Wayland? In-Reply-To: References: Message-ID: Thank you for the clarification! I suspected as much, but wanted to be absolutely sure. On Fri, Sep 2, 2022 at 5:11 PM Jonas ?dahl wrote: > On Fri, Sep 02, 2022 at 04:14:26PM +0300, Maxim Kartashev wrote: > > Java has an API that is supposed to return the number of buttons of the > > mouse - MouseInfo.getNumberOfButtons() > > < > https://docs.oracle.com/javase/8/docs/api/java/awt/MouseInfo.html#getNumberOfButtons-- > >. > > I wonder if it's possible to learn this number from Wayland somehow? The > > protocol seems to not put any cap on the value of the button code in the > > corresponding event. > > This information is currently not exposed via Wayland. What is exposed > is a single abstracted "pointer" device for all combined pointing > devices, including touchpads, traditional mouse devices, track points, > and so on. > > It also doesn't expose current active global state to anyone wanting to > query it, as pointer state is sent via events in response to focus > changes or pointer movements, and are localized to surface local > coordinates for the surface that currently has pointer focus. > > It appears that MouseInfo.getNumberOfButtons(), as well as > PointerInfo.getDevice() and PointerInfo.getLocation() have no existing > way to be implemented. > > Note that Wayland's approach to input events make this "hard" by design, > as the intention is that clients react to abstracted high level > localized input events only when they have active focus, to avoid > leaking otherwise potentially sensitive information to clients not > currently being actively used. > > > Jonas > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From philip.race at oracle.com Thu Sep 15 18:23:37 2022 From: philip.race at oracle.com (Philip Race) Date: Thu, 15 Sep 2022 11:23:37 -0700 Subject: Wakefield BOF at JavaOne 2022 - Las Vegas - Oct 17-20 Message-ID: <25bee149-910f-8479-4158-3ec709d11aa2@oracle.com> A BOF on Project Wakefield has been accepted for the in person Java One 2022 conference being held in conjunction with Oracle Cloudworld from 17th-20th October in Las Vegas. I don't know the location/day/time yet but here is the text from the online session catalog and a link which should take you directly to that session there Project Wakefield : A New Wayland Desktop for Java on Linux [BOF2627] Phil Race, Oracle OpenJDK Project Wakefield is investigating the tricky task of delivering a rewrite of the JDK desktop environment for Linux to natively support the new Wayland compositing desktop. This BOF discussion digs deep into some of the difficult challenges ahead. Experience: JavaOne Topic: Java JavaOne Track: Core Java Platform Session Type: Birds of a Feather Job Role: Developer https://reg.rf.oracle.com/flow/oracle/cloudworld/session-catalog/page/catalog?search.topic=1651238230807008ZfDn&search.sessiontype=1579236116729001AYGd&search.sessionlevel=16517654559160011UkM&search=%22Core%20Java%20Platform%22 -phil. From duke at openjdk.org Fri Sep 23 06:13:40 2022 From: duke at openjdk.org (duke) Date: Fri, 23 Sep 2022 06:13:40 GMT Subject: git: openjdk/wakefield: pure_wl_toolkit: Basic support of input and focus events Message-ID: <72370bd0-23ca-4519-a0a8-a0101b8e4e48@openjdk.org> Changeset: 1d3b37c3 Author: Maxim Kartashev Date: 2022-09-23 09:12:02 +0000 URL: https://git.openjdk.org/wakefield/commit/1d3b37c3e193a22270b86163cf34993bead97e8e Basic support of input and focus events ! src/java.desktop/unix/classes/sun/awt/wl/WLComponentPeer.java + src/java.desktop/unix/classes/sun/awt/wl/WLInputState.java + src/java.desktop/unix/classes/sun/awt/wl/WLKeySym.java ! src/java.desktop/unix/classes/sun/awt/wl/WLKeyboardFocusManagerPeer.java + src/java.desktop/unix/classes/sun/awt/wl/WLPointerEvent.java ! src/java.desktop/unix/classes/sun/awt/wl/WLToolkit.java ! src/java.desktop/unix/classes/sun/java2d/wl/WLSurfaceData.java ! src/java.desktop/unix/native/common/java2d/wl/WLSurfaceData.c ! src/java.desktop/unix/native/libawt_wlawt/WLToolkit.c ! src/java.desktop/unix/native/libawt_wlawt/WLToolkit.h From maxim.kartashev at jetbrains.com Fri Sep 23 06:22:36 2022 From: maxim.kartashev at jetbrains.com (Maxim Kartashev) Date: Fri, 23 Sep 2022 09:22:36 +0300 Subject: Keyboard and pointer input is now supported Message-ID: I have just pushed a commit that adds basic support for mouse/keyboard input and focus events to the "pure" Wayland toolkit: https://github.com/openjdk/wakefield/tree/pure_wl_toolkit It is now possible to launch some meaningful demos like Notepad.jar, navigate the menu, type in some text in several languages, etc. A short demo gif has been added to the wiki page ( https://wiki.openjdk.org/display/wakefield/Pure+Wayland+toolkit+prototype, towards the bottom of the page). Remember to supply the -Dawt.toolkit.name=WLToolkit argument if you want to try it yourself. I'm going to work on implementing keyboard repeat now as this is one of the many things Wayland leaves for its clients to take care of. -------------- next part -------------- An HTML attachment was scrubbed... URL: From neugens at redhat.com Fri Sep 23 11:01:02 2022 From: neugens at redhat.com (Mario Torre) Date: Fri, 23 Sep 2022 13:01:02 +0200 Subject: Keyboard and pointer input is now supported In-Reply-To: References: Message-ID: Outstanding, Maxim! Cheers, Mario On Fri, Sep 23, 2022 at 8:23 AM Maxim Kartashev wrote: > > I have just pushed a commit that adds basic support for mouse/keyboard input and focus events to the "pure" Wayland toolkit: https://github.com/openjdk/wakefield/tree/pure_wl_toolkit > It is now possible to launch some meaningful demos like Notepad.jar, navigate the menu, type in some text in several languages, etc. A short demo gif has been added to the wiki page (https://wiki.openjdk.org/display/wakefield/Pure+Wayland+toolkit+prototype, towards the bottom of the page). Remember to supply the -Dawt.toolkit.name=WLToolkit argument if you want to try it yourself. > > I'm going to work on implementing keyboard repeat now as this is one of the many things Wayland leaves for its clients to take care of. -- Mario Torre Manager, Software Engineering, OpenJDK 9704 A60C B4BE A8B8 0F30 9205 5D7E 4952 3F65 7898 Red Hat GmbH, Registered seat: Werner von Siemens Ring 12, D-85630 Grasbrunn, Germany Commercial register: Amtsgericht Muenchen/Munich, HRB 153243, Managing Directors: Ryan Barnhart, Charles Cachera, Michael O'Neill, Amy Ross From duke at openjdk.org Tue Sep 27 09:25:08 2022 From: duke at openjdk.org (duke) Date: Tue, 27 Sep 2022 09:25:08 GMT Subject: git: openjdk/wakefield: pure_wl_toolkit: Allow WLToolkit to work without DISPLAY set Message-ID: Changeset: 68d70768 Author: Maxim Kartashev Date: 2022-09-27 12:24:13 +0000 URL: https://git.openjdk.org/wakefield/commit/68d70768d9e2d233ad71d66a0fbfc389706ca202 Allow WLToolkit to work without DISPLAY set ! src/java.desktop/unix/classes/sun/awt/PlatformGraphicsInfo.java From duke at openjdk.org Fri Sep 30 10:28:49 2022 From: duke at openjdk.org (duke) Date: Fri, 30 Sep 2022 10:28:49 GMT Subject: git: openjdk/wakefield: pure_wl_toolkit: Support for key repeat events Message-ID: <89537a8b-828c-4bd8-bf0f-c21acb55437d@openjdk.org> Changeset: f90282fa Author: Maxim Kartashev Date: 2022-09-30 13:23:54 +0000 URL: https://git.openjdk.org/wakefield/commit/f90282fa9bac1abbf425c013f762ba75ed4981c6 Support for key repeat events ! src/java.desktop/unix/classes/sun/awt/wl/WLKeySym.java ! src/java.desktop/unix/classes/sun/awt/wl/WLToolkit.java ! src/java.desktop/unix/native/libawt_wlawt/WLToolkit.c