Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v12]

2023-06-07 Thread Alexander Zvegintsev
> Modern Linux systems often come with > [Wayland](https://wayland.freedesktop.org/) by default. > This comes with some difficulties, and one of them is the inability to get > screenshots from the system. > This is because we now use the [X Window System >

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v11]

2023-06-07 Thread Alexander Zvegintsev
On Wed, 7 Jun 2023 04:44:44 GMT, Prasanta Sadhukhan wrote: >> Alexander Zvegintsev has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - move screencast-tokens.properties to a new location >> - fix failure of >>

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v11]

2023-06-07 Thread Alexander Zvegintsev
On Wed, 7 Jun 2023 05:40:38 GMT, Phil Race wrote: >> src/java.desktop/unix/classes/sun/awt/screencast/TokenStorage.java line 145: >> >>> 143: path, >>> 144: Set.of(PosixFilePermission.OWNER_READ, >>> 145:

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v11]

2023-06-06 Thread Prasanta Sadhukhan
On Wed, 7 Jun 2023 05:12:44 GMT, Prasanta Sadhukhan wrote: >> Alexander Zvegintsev has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - move screencast-tokens.properties to a new location >> - fix failure of >>

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v11]

2023-06-06 Thread Phil Race
On Wed, 7 Jun 2023 05:05:38 GMT, Prasanta Sadhukhan wrote: >> Alexander Zvegintsev has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - move screencast-tokens.properties to a new location >> - fix failure of >>

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v11]

2023-06-06 Thread Prasanta Sadhukhan
On Wed, 7 Jun 2023 01:27:50 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v11]

2023-06-06 Thread Alexander Zvegintsev
> Modern Linux systems often come with > [Wayland](https://wayland.freedesktop.org/) by default. > This comes with some difficulties, and one of them is the inability to get > screenshots from the system. > This is because we now use the [X Window System >

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v10]

2023-06-05 Thread Alexander Zuev
On Thu, 1 Jun 2023 12:40:55 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v10]

2023-06-01 Thread Phil Race
On Thu, 1 Jun 2023 12:40:55 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v9]

2023-06-01 Thread Alexander Zvegintsev
On Wed, 31 May 2023 20:53:03 GMT, Andrey Turbanov wrote: >> Alexander Zvegintsev has updated the pull request incrementally with four >> additional commits since the last revision: >> >> - improve retVal processing >> - address token storage comments >> - removing non-ascii >> -

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v10]

2023-06-01 Thread Alexander Zvegintsev
> Modern Linux systems often come with > [Wayland](https://wayland.freedesktop.org/) by default. > This comes with some difficulties, and one of them is the inability to get > screenshots from the system. > This is because we now use the [X Window System >

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v9]

2023-06-01 Thread Andrey Turbanov
On Wed, 31 May 2023 15:03:04 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v9]

2023-06-01 Thread Andrey Turbanov
On Wed, 31 May 2023 15:03:04 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v9]

2023-05-31 Thread Phil Race
On Wed, 31 May 2023 15:03:04 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v9]

2023-05-31 Thread Andrey Turbanov
On Wed, 31 May 2023 15:03:04 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v9]

2023-05-31 Thread Andrey Turbanov
On Wed, 31 May 2023 15:03:04 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v9]

2023-05-31 Thread Andrey Turbanov
On Wed, 31 May 2023 15:03:04 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v9]

2023-05-31 Thread Andrey Turbanov
On Wed, 31 May 2023 15:03:04 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v9]

2023-05-31 Thread Andrey Turbanov
On Wed, 31 May 2023 15:03:04 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v9]

2023-05-31 Thread Phil Race
On Wed, 31 May 2023 15:03:04 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v8]

2023-05-31 Thread Alexander Zvegintsev
On Tue, 30 May 2023 19:33:20 GMT, Phil Race wrote: >> Alexander Zvegintsev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fix macos build > > src/java.desktop/unix/classes/sun/awt/screencast/ScreencastHelper.java line > 139: > >>

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v9]

2023-05-31 Thread Alexander Zvegintsev
> Modern Linux systems often come with > [Wayland](https://wayland.freedesktop.org/) by default. > This comes with some difficulties, and one of them is the inability to get > screenshots from the system. > This is because we now use the [X Window System >

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v8]

2023-05-30 Thread Phil Race
On Sat, 27 May 2023 01:25:40 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v7]

2023-05-26 Thread Alexander Zvegintsev
On Fri, 26 May 2023 21:50:15 GMT, Phil Race wrote: > macos builds are broken with this change. The problem is > unix/classes/sun/awt/screencast, causing unix/classes/sun/awt/X11 to be built > but it fails because we don't (and shouldn't) generate the XAWT source on > macOS. > > You need to

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v8]

2023-05-26 Thread Alexander Zvegintsev
> Modern Linux systems often come with > [Wayland](https://wayland.freedesktop.org/) by default. > This comes with some difficulties, and one of them is the inability to get > screenshots from the system. > This is because we now use the [X Window System >

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v7]

2023-05-26 Thread Phil Race
On Thu, 25 May 2023 16:29:39 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v7]

2023-05-26 Thread Maxim Kartashev
On Thu, 25 May 2023 16:29:39 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v7]

2023-05-26 Thread Alexander Zvegintsev
On Fri, 26 May 2023 15:32:41 GMT, Maxim Kartashev wrote: > Tried running this version on my machine (Ubuntu 22.04, two displays with > 100% and 200% scaling). A few observations: > > 1. I couldn't get any of the screenshot tests working through `jtreg` > (screenshots are all black, no

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v7]

2023-05-26 Thread Maxim Kartashev
On Thu, 25 May 2023 16:29:39 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v7]

2023-05-25 Thread Alexander Zvegintsev
On Thu, 25 May 2023 16:29:39 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v7]

2023-05-25 Thread Alexander Zvegintsev
> Modern Linux systems often come with > [Wayland](https://wayland.freedesktop.org/) by default. > This comes with some difficulties, and one of them is the inability to get > screenshots from the system. > This is because we now use the [X Window System >

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v6]

2023-05-25 Thread Andrey Turbanov
On Tue, 23 May 2023 15:15:29 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v5]

2023-05-23 Thread Alexander Zvegintsev
On Mon, 22 May 2023 22:34:17 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v6]

2023-05-23 Thread Alexander Zvegintsev
> Modern Linux systems often come with > [Wayland](https://wayland.freedesktop.org/) by default. > This comes with some difficulties, and one of them is the inability to get > screenshots from the system. > This is because we now use the [X Window System >

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v5]

2023-05-22 Thread Alexander Zvegintsev
> Modern Linux systems often come with > [Wayland](https://wayland.freedesktop.org/) by default. > This comes with some difficulties, and one of them is the inability to get > screenshots from the system. > This is because we now use the [X Window System >

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v4]

2023-05-22 Thread Alexander Zvegintsev
> Modern Linux systems often come with > [Wayland](https://wayland.freedesktop.org/) by default. > This comes with some difficulties, and one of them is the inability to get > screenshots from the system. > This is because we now use the [X Window System >

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots

2023-05-18 Thread Alexander Zvegintsev
On Fri, 5 May 2023 14:58:15 GMT, Alexander Zvegintsev wrote: > Do we really need to add this new API? probably we can implement the feature > w/o this new method? Please review the changes to remove resetScreenCapturePermission The token is now stored together with the bounds of the screens

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v3]

2023-05-18 Thread Alexander Zvegintsev
> Modern Linux systems often come with > [Wayland](https://wayland.freedesktop.org/) by default. > This comes with some difficulties, and one of them is the inability to get > screenshots from the system. > This is because we now use the [X Window System >

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v2]

2023-05-11 Thread Alexander Zvegintsev
On Wed, 10 May 2023 21:59:37 GMT, Phil Race wrote: > > It is not for the "we have all permissions" case, it is for the case when > > we only have a permission to some screens. So it won't hurt. > > But how does the app know when to call it ? Right now it doesn't know. If the user is not

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v2]

2023-05-10 Thread Phil Race
On Tue, 9 May 2023 22:09:26 GMT, Alexander Zvegintsev wrote: > > I want to work through the scenarios and how much of it is specific to the > > behaviours of the API you are using and so forth. Since you use the > > Preferences API for saving the token, if you keyed it off the Robot class >

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v2]

2023-05-09 Thread Alexander Zvegintsev
On Tue, 9 May 2023 20:43:13 GMT, Phil Race wrote: > I want to work through the scenarios and how much of it is specific to the > behaviours of the API you are using and so forth. Since you use the > Preferences API for saving the token, if you keyed it off the Robot class > rather than the

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v2]

2023-05-09 Thread Phil Race
On Fri, 5 May 2023 14:35:46 GMT, Alexander Zvegintsev wrote: >> Modern Linux systems often come with >> [Wayland](https://wayland.freedesktop.org/) by default. >> This comes with some difficulties, and one of them is the inability to get >> screenshots from the system. >> This is because we

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots

2023-05-09 Thread Alexander Zvegintsev
On Mon, 8 May 2023 18:41:56 GMT, Sergey Bylokhov wrote: > > It seems that the current robot API is not suitable for this. > > Can we just reset the token when we create a new instance of Robot? This will be a big problem for automated testing, as each test with the robot will require user

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots

2023-05-08 Thread Sergey Bylokhov
On Fri, 5 May 2023 14:58:15 GMT, Alexander Zvegintsev wrote: > It seems that the current robot API is not suitable for this. Can we just reset the token when we create a new instance of Robot? - PR Comment: https://git.openjdk.org/jdk/pull/13803#issuecomment-1538859204

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots

2023-05-05 Thread Alexander Zvegintsev
On Fri, 5 May 2023 02:37:28 GMT, Sergey Bylokhov wrote: > > If the user wishes to change their mind about the screens allowed to be > > captured, the user should use the new Robot#resetScreenCapturePermission > > method > > Do we really need to add this new API? probably we can implement the

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v2]

2023-05-05 Thread Maxim Kartashev
On Fri, 5 May 2023 14:26:49 GMT, Alexander Zvegintsev wrote: > P.S. I removed synchronized modifier from getRGBPixels My main point was that you don't seem to need to have both, and while I picked one you picked the other ;-) So it's OK. >>

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v2]

2023-05-05 Thread Alexander Zvegintsev
On Thu, 4 May 2023 19:52:22 GMT, Erik Joelsson wrote: >> Alexander Zvegintsev has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - update, based on review comments >> - remove wayland detection >> - BUILD_LIBPIPEWIRE_HEADER_DIRS ->

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v2]

2023-05-05 Thread Alexander Zvegintsev
> Modern Linux systems often come with > [Wayland](https://wayland.freedesktop.org/) by default. > This comes with some difficulties, and one of them is the inability to get > screenshots from the system. > This is because we now use the [X Window System >

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots [v2]

2023-05-05 Thread Alexander Zvegintsev
On Fri, 5 May 2023 09:33:00 GMT, Maxim Kartashev wrote: >> Alexander Zvegintsev has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - update, based on review comments >> - remove wayland detection >> - BUILD_LIBPIPEWIRE_HEADER_DIRS ->

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots

2023-05-05 Thread Maxim Kartashev
On Thu, 4 May 2023 14:18:44 GMT, Alexander Zvegintsev wrote: > Modern Linux systems often come with > [Wayland](https://wayland.freedesktop.org/) by default. > This comes with some difficulties, and one of them is the inability to get > screenshots from the system. > This is because we now

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots

2023-05-04 Thread Sergey Bylokhov
On Thu, 4 May 2023 14:18:44 GMT, Alexander Zvegintsev wrote: > If the user wishes to change their mind about the screens allowed to be > captured, the user should use the new Robot#resetScreenCapturePermission > method Do we really need to add this new API? probably we can implement the

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots

2023-05-04 Thread Phil Race
On Thu, 4 May 2023 19:56:21 GMT, Erik Joelsson wrote: > I would like to understand why we need to add third party headers to our > source tree. Are these not generally available on Linux systems? They are not available on anything except very new Linux distros. Forget RHEL 6.x / 7.x. I'm

Re: RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots

2023-05-04 Thread Erik Joelsson
On Thu, 4 May 2023 14:18:44 GMT, Alexander Zvegintsev wrote: > Modern Linux systems often come with > [Wayland](https://wayland.freedesktop.org/) by default. > This comes with some difficulties, and one of them is the inability to get > screenshots from the system. > This is because we now

RFR: 8280982: [Wayland] [XWayland] java.awt.Robot taking screenshots

2023-05-04 Thread Alexander Zvegintsev
Modern Linux systems often come with [Wayland](https://wayland.freedesktop.org/) by default. This comes with some difficulties, and one of them is the inability to get screenshots from the system. This is because we now use the [X Window System