Re: RFR: 8342096: Popup menus that request focus are not shown on Linux with Wayland [v5]

2025-01-29 Thread Alexey Ivanov
On Fri, 24 Jan 2025 21:23:02 GMT, Alexander Zvegintsev wrote: >> The previous [JDK-8319103](https://bugs.openjdk.org/browse/JDK-8319103) fix >> was not complete. >> >> The case where a menu item with a focusable component was not a direct child >> of a window was missing(failing the `if (wind

Re: RFR: 8342524: Use latch in AbstractButton/bug6298940.java instead of delay [v2]

2025-01-29 Thread Alexey Ivanov
> Use a `CountDownLatch` in `javax/swing/AbstractButton/bug6298940.java` > instead of delay. > Use `Util.hitMnemonics` instead of custom code to handle macOS. > > I ran the updated test a few times with `JTREG=REPEAT_COUNT=20`, the test > always passed in the CI. Alexey

Re: RFR: 8348648: Unnecessary Hashtable usage in javax.swing.text.html.CSS.LengthUnit

2025-01-29 Thread Alexey Ivanov
On Mon, 20 Jan 2025 13:07:19 GMT, Andrey Turbanov wrote: > Two `Hashtable`'s in `javax.swing.text.html.CSS.LengthUnit` class are > modified only within `` block: > 1. lengthMapping > 2. w3cLengthMapping > > We can replace them with immutable maps to avoid Hashtable synchronization > overhead.

Re: RFR: 8336382: Fixes error reporting in loading AWT and fonts [v10]

2025-01-29 Thread Alexey Ivanov
On Mon, 27 Jan 2025 16:12:34 GMT, Karm Michal Babacek wrote: >> src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c line 70: >> >>> 68: graphicsEnvClass = (*env)->FindClass(env, >>> 69: >>> "java/awt/GraphicsEnvironment"); >>> 70:

Re: RFR: 8348865: JButton/bug4796987.java never runs because Windows XP is unavailable

2025-01-29 Thread Alexey Ivanov
On Tue, 28 Jan 2025 23:45:54 GMT, Sergey Bylokhov wrote: >> The `javax/swing/JButton/4796987/bug4796987.java` test strictly verifies if >> it's run on Windows XP, for this reason it never runs on modern versions of >> Windows. >> >> Since Windows XP is obsolete and visual styles cannot be disa

Re: RFR: 8348865: JButton/bug4796987.java never runs because Windows XP is unavailable

2025-01-29 Thread Alexey Ivanov
On Wed, 29 Jan 2025 09:44:42 GMT, Tejesh R wrote: > If the test is for only XP, then why to retain it ? Can't we remove the test > since xp is not supported ? The test is still relevant: visual styles that were introduced in Windows XP are still here. Essentially, the test verifies that no but

Re: RFR: 8336382: Fixes error reporting in loading AWT and fonts [v10]

2025-01-29 Thread Alexey Ivanov
On Tue, 26 Nov 2024 15:11:58 GMT, Karm Michal Babacek wrote: >> If there is a problem with finding and calling e.g. >> `java/awt/GraphicsEnvironment` in `AWTIsHeadless`, the env' Exception >> remains set and it is not cleared. Later, that manifests as: >> >> Fatal error reported via JNI: C

Re: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v6]

2025-01-28 Thread Alexey Ivanov
On Mon, 27 Jan 2025 10:03:45 GMT, Sergey Bylokhov wrote: > I would like to clarify one point: if the robot moves the mouse off the > screen while the actual mouse pointer is on the screen and immediately > presses the mouse button, where will the click occur? on or off the screen? That's a goo

Re: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v7]

2025-01-28 Thread Alexey Ivanov
On Tue, 28 Jan 2025 04:43:44 GMT, Alisen Chung wrote: >> Currently on macOS when mouseMove is given an offscreen coordinate to move >> the mouse to, mouseMove will physically clamp to the edge of the screen, but >> if you try to grab the mouse location immediately after by using >> MouseInfo.g

Re: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v6]

2025-01-28 Thread Alexey Ivanov
On Tue, 28 Jan 2025 18:39:44 GMT, Alisen Chung wrote: >> src/java.desktop/share/classes/java/awt/Robot.java line 175: >> >>> 173: for (int i = 0; i < gs.length; i++) { >>> 174: allScreenBounds[i] = >>> gs[i].getDefaultConfiguration().getBounds(); >>> 175: } >> >> Th

Re: RFR: 8348675: TrayIcon tests fail in Ubuntu 24.10 Wayland

2025-01-28 Thread Alexey Ivanov
On Tue, 28 Jan 2025 17:47:56 GMT, Alexey Ivanov wrote: >> Several TrayIcon tests are trying to click on the system tray icon with >> Robot using XTest API. >> >> Basically we have the same kind of failures as before, e.g. >> [JDK-8280990](https://bugs.openjdk.or

Re: RFR: 8348675: TrayIcon tests fail in Ubuntu 24.10 Wayland

2025-01-28 Thread Alexey Ivanov
On Tue, 28 Jan 2025 11:28:27 GMT, Alexander Zvegintsev wrote: > Several TrayIcon tests are trying to click on the system tray icon with Robot > using XTest API. > > Basically we have the same kind of failures as before, e.g. > [JDK-8280990](https://bugs.openjdk.org/browse/JDK-8280990) >> the

Re: RFR: 8342870: Errors related to unused code on Windows after 8339120 in accessibility [v5]

2025-01-28 Thread Alexey Ivanov
On Fri, 24 Jan 2025 20:36:20 GMT, Alexey Ivanov wrote: >> I wonder if this falls into the category of "Can be used in a debugger" like >> Alex mentioned above, if not I'll remove it > > I see no reason to keep it. > > If it's needed during debug

Re: RFR: 8342870: Errors related to unused code on Windows after 8339120 in accessibility [v5]

2025-01-28 Thread Alexey Ivanov
On Fri, 24 Jan 2025 20:34:26 GMT, Alexey Ivanov wrote: >> src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp line 364: >> >>> 362: } >>> 363: >>> 364: int regDeleteValue(HKEY hFamilyKey, LPCWSTR lpSubKey) >> >> There's one more

Re: RFR: 8342870: Errors related to unused code on Windows after 8339120 in accessibility [v5]

2025-01-28 Thread Alexey Ivanov
On Fri, 24 Jan 2025 20:13:26 GMT, Alexey Ivanov wrote: >> By the above statement are you referring to the lines 336 to 341? I'll admit >> I'm a little lost for this one > > I'll submit a new bug to address this problem. > > It's not just a matter

RFR: 8348865: JButton/bug4796987.java never runs because Windows XP is unavailable

2025-01-28 Thread Alexey Ivanov
The `javax/swing/JButton/4796987/bug4796987.java` test strictly verifies if it's run on Windows XP, for this reason it never runs on modern versions of Windows. Since Windows XP is obsolete and visual styles cannot be disabled since Windows 8, I removed the OS version check completely. I captu

Re: RFR: 8348865: JButton/bug4796987.java never runs because Windows XP is unavailable

2025-01-28 Thread Alexey Ivanov
On Tue, 28 Jan 2025 14:51:57 GMT, Alexey Ivanov wrote: > The `javax/swing/JButton/4796987/bug4796987.java` test strictly verifies if > it's run on Windows XP, for this reason it never runs on modern versions of > Windows. > > Since Windows XP is obsolete and visual style

Re: RFR: 8348648: Unnecessary Hashtable usage in javax.swing.text.html.CSS.LengthUnit

2025-01-28 Thread Alexey Ivanov
On Mon, 20 Jan 2025 13:07:19 GMT, Andrey Turbanov wrote: > Two `Hashtable`'s in `javax.swing.text.html.CSS.LengthUnit` class are > modified only within `` block: > 1. lengthMapping > 2. w3cLengthMapping > > We can replace them with immutable maps to avoid Hashtable synchronization > overhead.

Re: RFR: 8348760: RadioButton is not shown if JRadioButtonMenuItem is rendered with ImageIcon in WindowsLookAndFeel

2025-01-28 Thread Alexey Ivanov
On Tue, 28 Jan 2025 03:40:26 GMT, Prasanta Sadhukhan wrote: > When JRadioButtonMenuItem is called with imageIcon, then only imageIcon is > shown without radiobutton in WIndowsLookAndFeel as there was no provision of > drawing the radiobutton alongside icon. > If icon is not there, the radiobut

Re: RFR: 8348760: RadioButton is not shown if JRadioButtonMenuItem is rendered with ImageIcon in WindowsLookAndFeel

2025-01-28 Thread Alexey Ivanov
On Tue, 28 Jan 2025 08:34:30 GMT, Damon Nguyen wrote: >> When JRadioButtonMenuItem is called with imageIcon, then only imageIcon is >> shown without radiobutton in WIndowsLookAndFeel as there was no provision of >> drawing the radiobutton alongside icon. >> If icon is not there, the radiobutton

Re: RFR: 6899304 : java.awt.Toolkit.getScreenInsets(GraphicsConfiguration) returns incorrect values [v6]

2025-01-28 Thread Alexey Ivanov
l request incrementally with three additional > commits since the last revision: > > - Reduce the line length > >Co-authored-by: Alexey Ivanov > - Reduce the line length > >Co-authored-by: Alexey Ivanov > - add "@build jdk.tes

Re: RFR: 6899304 : java.awt.Toolkit.getScreenInsets(GraphicsConfiguration) returns incorrect values [v6]

2025-01-28 Thread Alexey Ivanov
On Tue, 28 Jan 2025 11:36:22 GMT, Alexey Ivanov wrote: > I added some debug prints to the test. Both width and height are 1 pixel off. By the way, the output of the values could be crucial in analysing failures, so it could worth adding right away. - PR Comment: ht

Re: RFR: 8342524: Use latch in AbstractButton/bug6298940.java instead of delay

2025-01-28 Thread Alexey Ivanov
On Tue, 28 Jan 2025 08:29:56 GMT, Damon Nguyen wrote: > I noticed that this test is newly added. Double-checking, is this > intentionally open-sourced? I intended open-sourcing the test when I submitted the bug. I see no reason why it should remain closed-source. We have been open-sourcing all

Re: RFR: 6899304 : java.awt.Toolkit.getScreenInsets(GraphicsConfiguration) returns incorrect values [v5]

2025-01-27 Thread Alexey Ivanov
On Sun, 26 Jan 2025 00:36:11 GMT, anass baya wrote: >> Screen number 0 is not always the primary screen, so we’ve removed the code >> that assumes it is. >> >> We used an existing test and took the following considerations into account >> for Windows: >> >> - On Windows, undecorated maximized

Re: RFR: 8342870: Errors related to unused code on Windows after 8339120 in accessibility [v5]

2025-01-24 Thread Alexey Ivanov
On Thu, 23 Jan 2025 05:49:47 GMT, Julian Waters wrote: >> src/jdk.accessibility/windows/native/jaccesswalker/jaccesswalker.cpp line >> 561: >> >>> 559: tvis.item = tvi; >>> 560: >>> 561: /* HTREEITEM treeNodeItem = */ TreeView_InsertItem(treeWnd, >>> &tvis); >> >> Since it's

Re: RFR: 8342870: Errors related to unused code on Windows after 8339120 in accessibility [v5]

2025-01-24 Thread Alexey Ivanov
On Tue, 21 Jan 2025 13:42:05 GMT, Alexey Ivanov wrote: >> Julian Waters has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains eight commits: >> >> - Merge branch 'openjdk:master' into a

Re: RFR: 8342870: Errors related to unused code on Windows after 8339120 in accessibility [v5]

2025-01-24 Thread Alexey Ivanov
On Thu, 23 Jan 2025 05:50:29 GMT, Julian Waters wrote: >> src/jdk.accessibility/windows/native/jaccesswalker/jaccesswalker.cpp line >> 261: >> >>> 259: GetClientRect(hWnd, &rcClient); >>> 260: // hwndEdit = >>> 261:CreateWindow("Edit", >> >> The edit control is

Re: RFR: 8342870: Errors related to unused code on Windows after 8339120 in accessibility [v5]

2025-01-24 Thread Alexey Ivanov
On Thu, 23 Jan 2025 05:46:29 GMT, Julian Waters wrote: >> src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp line 334: >> >>> 332: TCHAR dataBuffer[DEFAULT_ALLOC]; >>> 333: TCHAR *data = dataBuffer; >>> 334: // bool freeData = false; >> >> This should be set to `t

Re: RFR: 6899304 : java.awt.Toolkit.getScreenInsets(GraphicsConfiguration) returns incorrect values [v2]

2025-01-24 Thread Alexey Ivanov
On Thu, 23 Jan 2025 23:31:26 GMT, Harshitha Onkar wrote: > Based on > [GetMonitorInfo](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getmonitorinfoa) > API doc, it seems fine to use this API to query monitor info for both > primary and non-primary monitors but I'm not

Re: RFR: 6899304 : java.awt.Toolkit.getScreenInsets(GraphicsConfiguration) returns incorrect values [v2]

2025-01-24 Thread Alexey Ivanov
On Thu, 23 Jan 2025 22:29:22 GMT, anass baya wrote: >> Screen number 0 is not always the primary screen, so we’ve removed the code >> that assumes it is. >> >> We used an existing test and took the following considerations into account >> for Windows: >> >> - On Windows, undecorated maximized

Re: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v6]

2025-01-24 Thread Alexey Ivanov
On Fri, 24 Jan 2025 00:25:14 GMT, Alisen Chung wrote: >> Currently on macOS when mouseMove is given an offscreen coordinate to move >> the mouse to, mouseMove will physically clamp to the edge of the screen, but >> if you try to grab the mouse location immediately after by using >> MouseInfo.g

Re: RFR: 8342096: Popup menus that request focus are not shown on Linux with Wayland [v4]

2025-01-24 Thread Alexey Ivanov
On Wed, 22 Jan 2025 20:03:36 GMT, Harshitha Onkar wrote: > > What if the window that loses focus is not the parent of the popup > > hierarchy? Or is it guaranteed that all the children of the popup window > > receive the focus lost event? > > Doesn't the updated FocusablePopupDismissTest.java

Re: RFR: 8342096: Popup menus that request focus are not shown on Linux with Wayland [v3]

2025-01-24 Thread Alexey Ivanov
On Wed, 22 Jan 2025 19:57:04 GMT, Harshitha Onkar wrote: >> We wait long enough, so if it throws the `IIlegalCompnentStateException` >> something is not right anyway. >> >> But I updated it to `waitTillShown` + get location on EDT to save some test >> execution time where it is possible. > > S

Re: RFR: 8342096: Popup menus that request focus are not shown on Linux with Wayland [v4]

2025-01-24 Thread Alexey Ivanov
On Wed, 22 Jan 2025 03:42:56 GMT, Alexander Zvegintsev wrote: >> The previous [JDK-8319103](https://bugs.openjdk.org/browse/JDK-8319103) fix >> was not complete. >> >> The case where a menu item with a focusable component was not a direct child >> of a window was missing(failing the `if (wind

Re: RFR: 8342096: Popup menus that request focus are not shown on Linux with Wayland [v4]

2025-01-24 Thread Alexey Ivanov
On Tue, 21 Jan 2025 11:25:20 GMT, Alexander Zvegintsev wrote: > Not really, because a few lines after we ungrab the input, so all the popup > menu will be dismissed, performing cleanups in their `hide()` and > `setVisible()` methods. This answers my question. I guess I got lost or distracted

RFR: 8342524: Use latch in AbstractButton/bug6298940.java instead of delay

2025-01-24 Thread Alexey Ivanov
Use a `CountDownLatch` in `javax/swing/AbstractButton/bug6298940.java` instead of delay. Use `Util.hitMnemonics` instead of custom code to handle macOS. I ran the updated test a few times with `JTREG=REPEAT_COUNT=20`, the test always passed in the CI. - Commit messages: - 834252

Re: RFR: 8348170: Unnecessary Hashtable usage in CSS.styleConstantToCssMap

2025-01-24 Thread Alexey Ivanov
On Thu, 16 Jan 2025 11:53:18 GMT, Andrey Turbanov wrote: > There is a field `javax.swing.text.html.CSS#styleConstantToCssMap` which uses > legacy `Hashtable` class. > As this map is read-only and all its content is initialized in `` we > can safely use immutable `Map` instead. The tests are gr

Re: RFR: 8340784 : Remove PassFailJFrame constructor with screenshots

2025-01-23 Thread Alexey Ivanov
On Tue, 24 Dec 2024 03:02:51 GMT, anass baya wrote: > Remove PassFailJFrame constructor with screenshots since no test is using it The feature remains available when using the recommended builder pattern to create an instance of `PassFailJFrame`. This is to discourage using constructors direct

Integrated: 8348299: Update List/ItemEventTest/ItemEventTest.java

2025-01-23 Thread Alexey Ivanov
On Wed, 22 Jan 2025 16:45:17 GMT, Alexey Ivanov wrote: > With this changeset, I update the > `java/awt/List/ItemEventTest/ItemEventTest.java` test to improve its > stability and analysis of failures of the test. > > 1. Use thread-safe `StringBuffer` for `actualSelection

Re: RFR: 8340784 : Remove PassFailJFrame constructor with screenshots

2025-01-23 Thread Alexey Ivanov
On Tue, 24 Dec 2024 03:02:51 GMT, anass baya wrote: > Remove PassFailJFrame constructor with screenshots since no test is using it Changes requested by aivanov (Reviewer). Nearly good. Please, also update the copyright year at the top of the file: 2024 → 2025. Looks good. test/jdk/java/awt/r

Re: RFR: 8348299: Update List/ItemEventTest/ItemEventTest.java [v2]

2025-01-23 Thread Alexey Ivanov
On Thu, 23 Jan 2025 09:40:19 GMT, Alexander Zvegintsev wrote: >> Alexey Ivanov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use setLength to reset actualSelectionOrder >> >> Co-authored-by

Re: RFR: 8348299: Update List/ItemEventTest/ItemEventTest.java [v2]

2025-01-23 Thread Alexey Ivanov
never logged.) > 5. Take screenshot of the list on failure; > Optionally take screenshot after each mouse press+release if `-save` is > passed as a parameter to the test. > > The updated test passes. Alexey Ivanov has updated the pull request incrementally with one additiona

Re: RFR: 8348299: Update List/ItemEventTest/ItemEventTest.java [v2]

2025-01-23 Thread Alexey Ivanov
On Thu, 23 Jan 2025 09:33:33 GMT, Alexander Zvegintsev wrote: >> Alexey Ivanov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use setLength to reset actualSelectionOrder >> >> Co-authored-by

Integrated: 8348303: Remove repeated 'a' from ListSelectionEvent

2025-01-23 Thread Alexey Ivanov
On Wed, 22 Jan 2025 17:16:11 GMT, Alexey Ivanov wrote: > A trivial change which removes repeated ‘a’ from the [javadoc for the > `ListSelectionEvent` > class](https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/event/ListSelectionEvent.html): > >&

Integrated: 8348308: Make fields of ListSelectionEvent final

2025-01-23 Thread Alexey Ivanov
On Wed, 22 Jan 2025 20:20:28 GMT, Alexey Ivanov wrote: > The fields of `ListSelectionEvent` are set in the constructor and are never > modified, mark the fields — `firstIndex`, `lastIndex`, `isAdjusting` — with > the `final` modifier. This pull request has now been integrated.

Re: RFR: 8347008: beancontext package spec does not clearly explain why the API is deprecated [v2]

2025-01-22 Thread Alexey Ivanov
On Wed, 22 Jan 2025 00:50:56 GMT, Alexander Zvegintsev wrote: >> The beancontext package description or the deprecation text in the classes >> doesn't say anything about why the API is deprecated. >> A few more words have been added in this regard. > > Alexander Zvegintsev has updated the pull

Re: RFR: 8348308: Make fields of ListSelectionEvent final

2025-01-22 Thread Alexey Ivanov
On Wed, 22 Jan 2025 20:39:50 GMT, Abdelhak Zaaim wrote: > Please update it to 2025 to reflect the changes. File header will be updated by #23240. - PR Comment: https://git.openjdk.org/jdk/pull/23243#issuecomment-2608222128

RFR: 8348308: Make fields of ListSelectionEvent final

2025-01-22 Thread Alexey Ivanov
The fields of `ListSelectionEvent` are set in the constructor and are never modified, mark the fields — `firstIndex`, `lastIndex`, `isAdjusting` — with the `final` modifier. - Commit messages: - 8348308: Make fields of ListSelectionEvent final Changes: https://git.openjdk.org/jdk/

Re: RFR: 8318577: Windows Look-and-Feel JProgressBarUI does not render correctly on 2x UI scale [v2]

2025-01-22 Thread Alexey Ivanov
On Wed, 22 Jan 2025 07:02:21 GMT, Prasanta Sadhukhan wrote: >> JProgressBar (StringPainted variant) does not render consistently on HiDPI >> displays (e.g. 200% Scale Factor) on Windows (using Windows Look-and-Feel) >> depending on the height at which JProgressBar is rendered, in which case th

RFR: 8348303: Remove repeated 'a' from ListSelectionEvent

2025-01-22 Thread Alexey Ivanov
A trivial change which removes repeated ‘a’ from the [javadoc for the `ListSelectionEvent` class](https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/event/ListSelectionEvent.html): > “The change is limited to **a a** single inclusive interval.” In addition to the above,

RFR: 8348299: Update List/ItemEventTest/ItemEventTest.java

2025-01-22 Thread Alexey Ivanov
With this changeset, I update the `java/awt/List/ItemEventTest/ItemEventTest.java` test to improve its stability and analysis of failures of the test. 1. Use thread-safe `StringBuffer` for `actualSelectionOrder` to track selecting/deselecting items in the list. 2. Enable `robot.setAutoWaitForId

Re: RFR: 8346388: Cannot use DllMain in libawt for static builds [v6]

2025-01-22 Thread Alexey Ivanov
On Wed, 22 Jan 2025 14:27:55 GMT, Magnus Ihse Bursie wrote: >> To be able to properly support static builds on Windows in >> [JDK-8346377](https://bugs.openjdk.org/browse/JDK-8346377), we cannot use >> `DllMain`, for two reasons: >> >> 1) This is not called for statically linked libraries, and

Re: RFR: 8347008: beancontext package spec does not clearly explain why the API is deprecated

2025-01-21 Thread Alexey Ivanov
On Tue, 21 Jan 2025 14:28:26 GMT, Alexander Zvegintsev wrote: > The beancontext package description or the deprecation text in the classes > doesn't say anything about why the API is deprecated. > A few more words have been added in this regard. Overall, looks good, yet I've a question. src/j

Re: RFR: 8348170: Unnecessary Hashtable usage in CSS.styleConstantToCssMap

2025-01-21 Thread Alexey Ivanov
On Thu, 16 Jan 2025 11:53:18 GMT, Andrey Turbanov wrote: > There is a field `javax.swing.text.html.CSS#styleConstantToCssMap` which uses > legacy `Hashtable` class. > As this map is read-only and all its content is initialized in `` we > can safely use immutable `Map` instead. Marked as review

Re: RFR: 8342870: Errors related to unused code on Windows after 8339120 in accessibility [v5]

2025-01-21 Thread Alexey Ivanov
On Tue, 21 Jan 2025 00:34:39 GMT, Julian Waters wrote: >> src/jdk.accessibility/windows/native/bridge/AccessBridgeCalls.c line 233: >> >>> 231: return TRUE; >>> 232: } >>> 233: ((void) error); >> >> Not sure why do we need it. I mean there is a value assignment befor

Re: RFR: 8342870: Errors related to unused code on Windows after 8339120 in accessibility [v5]

2025-01-21 Thread Alexey Ivanov
On Tue, 7 Jan 2025 09:56:11 GMT, Julian Waters wrote: >> After 8339120, gcc began catching many different instances of unused code in >> the Windows specific codebase. Some of these seem to be bugs. I've taken the >> effort to mark out all the relevant globals and locals that trigger the >> un

Re: RFR: 8347475: GTK: javax/swing/JColorChooser/Test8152419.java there are no swatches or RGB tab in JColorChooser [v3]

2025-01-21 Thread Alexey Ivanov
On Tue, 21 Jan 2025 04:09:17 GMT, Abhishek Kumar wrote: >> There are no tabs available for GTK Look and Feel due to the different >> ColorChooser UI design. Updated the test to skip testing for GTK L&F. > > Abhishek Kumar has updated the pull request incrementally with one additional > commit s

Re: RFR: 8346388: Cannot use DllMain in libawt for static builds [v4]

2025-01-20 Thread Alexey Ivanov
On Mon, 20 Jan 2025 21:32:17 GMT, Magnus Ihse Bursie wrote: >> src/java.desktop/windows/native/libawt/windows/awt_Toolkit.cpp line 108: >> >>> 106: * of a dynamic library build, or the .EXE in case of a static build. >>> 107: */ >>> 108: HMODULE GetAwtModuleHandle() { >> >> Should it be `stat

Re: RFR: 8336382: Fixes error reporting in loading AWT and fonts [v9]

2025-01-20 Thread Alexey Ivanov
On Wed, 23 Oct 2024 19:54:17 GMT, Sergey Bylokhov wrote: >> src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c line 70: >> >>> 68: graphicsEnvClass = (*env)->FindClass(env, >>> 69: >>> "java/awt/GraphicsEnvironment"); >>> 70: C

Re: RFR: 8336382: Fixes error reporting in loading AWT and fonts [v10]

2025-01-20 Thread Alexey Ivanov
On Wed, 24 Jul 2024 12:45:46 GMT, Karm Michal Babacek wrote: >> src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c line 83: >> >>> 81: headlessFn); >>> 82: // If an exception occurred, we assume headless mode. >>> 83: if

Re: RFR: 8336382: Fixes error reporting in loading AWT and fonts [v10]

2025-01-20 Thread Alexey Ivanov
On Tue, 26 Nov 2024 15:11:58 GMT, Karm Michal Babacek wrote: >> If there is a problem with finding and calling e.g. >> `java/awt/GraphicsEnvironment` in `AWTIsHeadless`, the env' Exception >> remains set and it is not cleared. Later, that manifests as: >> >> Fatal error reported via JNI: C

Re: RFR: 8342096: Popup menus that request focus are not shown on Linux with Wayland [v2]

2025-01-20 Thread Alexey Ivanov
On Mon, 20 Jan 2025 01:08:01 GMT, Alexander Zvegintsev wrote: >> The previous [JDK-8319103](https://bugs.openjdk.org/browse/JDK-8319103) fix >> was not complete. >> >> The case where a menu item with a focusable component was not a direct child >> of a window was missing(failing the `if (wind

Re: RFR: 8342096: Popup menus that request focus are not shown on Linux with Wayland [v2]

2025-01-20 Thread Alexey Ivanov
On Mon, 20 Jan 2025 19:28:20 GMT, Alexey Ivanov wrote: >> Updated to cover this case by adding the listener to all owned windows. > > I'm still unconvinced the listener is always removed… > > Shouldn't the line below > > h

Re: RFR: 8342096: Popup menus that request focus are not shown on Linux with Wayland [v2]

2025-01-20 Thread Alexey Ivanov
On Mon, 20 Jan 2025 01:00:26 GMT, Alexander Zvegintsev wrote: >> As far as my tests with an instrumented build show - yes, but I discovered >> another case not covered: >> >> >> for (int i = 0; i <= 1; i++) { >> JMenu menu = new JMenu("Menu " + i); >> menu.add(new JTextField("JTextFie

Re: RFR: 8342096: Popup menus that request focus are not shown on Linux with Wayland [v2]

2025-01-20 Thread Alexey Ivanov
On Fri, 13 Dec 2024 22:14:31 GMT, Alexander Zvegintsev wrote: >> test/jdk/javax/swing/JPopupMenu/NestedFocusablePopupTest.java line 53: >> >>> 51: //test is valid only when running on Wayland. >>> 52: return; >>> 53: } >> >> I think it should rather throw `jtreg

Re: RFR: 8342096: Popup menus that request focus are not shown on Linux with Wayland [v2]

2025-01-20 Thread Alexey Ivanov
On Mon, 20 Jan 2025 01:08:01 GMT, Alexander Zvegintsev wrote: >> The previous [JDK-8319103](https://bugs.openjdk.org/browse/JDK-8319103) fix >> was not complete. >> >> The case where a menu item with a focusable component was not a direct child >> of a window was missing(failing the `if (wind

Re: RFR: 8347475: GTK: javax/swing/JColorChooser/Test8152419.java there is no swatches or RGB tab in JColorChooser [v2]

2025-01-20 Thread Alexey Ivanov
On Mon, 20 Jan 2025 13:07:19 GMT, Abhishek Kumar wrote: >> There are no tabs available for GTK Look and Feel due to the different >> ColorChooser UI design. Updated the test to skip testing for GTK L&F. > > Abhishek Kumar has updated the pull request incrementally with one additional > commit s

Re: RFR: 8346388: Cannot use DllMain in libawt for static builds [v4]

2025-01-20 Thread Alexey Ivanov
On Wed, 15 Jan 2025 11:23:29 GMT, Magnus Ihse Bursie wrote: >> To be able to properly support static builds on Windows in >> [JDK-8346377](https://bugs.openjdk.org/browse/JDK-8346377), we cannot use >> `DllMain`, for two reasons: >> >> 1) This is not called for statically linked libraries, and

Re: RFR: 8346388: Cannot use DllMain in libawt for static builds [v4]

2025-01-20 Thread Alexey Ivanov
On Wed, 15 Jan 2025 11:23:29 GMT, Magnus Ihse Bursie wrote: >> To be able to properly support static builds on Windows in >> [JDK-8346377](https://bugs.openjdk.org/browse/JDK-8346377), we cannot use >> `DllMain`, for two reasons: >> >> 1) This is not called for statically linked libraries, and

Re: RFR: 8346388: Cannot use DllMain in libawt for static builds [v4]

2025-01-20 Thread Alexey Ivanov
On Wed, 15 Jan 2025 11:23:29 GMT, Magnus Ihse Bursie wrote: >> To be able to properly support static builds on Windows in >> [JDK-8346377](https://bugs.openjdk.org/browse/JDK-8346377), we cannot use >> `DllMain`, for two reasons: >> >> 1) This is not called for statically linked libraries, and

Re: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v3]

2025-01-20 Thread Alexey Ivanov
On Sun, 19 Jan 2025 20:27:53 GMT, Jason Mehrens wrote: > > It is quite possible that we need to figure out what is going on with > > PointerInfo and fix something there first .. > > Not moving the mouse and locking the desktop can set X value larger the the > display. See: https://bugs.openjdk

Re: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v4]

2025-01-20 Thread Alexey Ivanov
On Fri, 20 Dec 2024 21:33:54 GMT, Phil Race wrote: > > Off topic: Is _“clamp”_ the right word for limiting mouse cursor > > coordinates to the virtual screen bounds? > > I think so, at least in programming it is used in this way. Did you have > another word in mind ? You're right, it's used t

Re: RFR: 8282862: AwtWindow::SetIconData leaks old icon handles if an exception is detected [v6]

2025-01-20 Thread Alexey Ivanov
On Mon, 20 Jan 2025 15:56:09 GMT, Alexey Ivanov wrote: > The call to `CreateIconFromRaster` has to be wrapped into a try-catch block > to ensure the C++ exception does not escape. > > I think it's reasonable to address this new issue under a new bugid. I submitted [J

Re: RFR: 8282862: AwtWindow::SetIconData leaks old icon handles if an exception is detected [v6]

2025-01-20 Thread Alexey Ivanov
On Fri, 17 Jan 2025 18:22:57 GMT, Rajat Mahajan wrote: >> **Issue:** >> AwtWindow::SetIconData leaks the old icon handles in hOldIcon and hOldIconSm >> if CreateIconFromRaster raises an exception. Additionally, an exception is >> checked only after the first call to CreateIconFromRaster. >> >

Re: RFR: 8282862: AwtWindow::SetIconData leaks old icon handles if an exception is detected [v6]

2025-01-20 Thread Alexey Ivanov
On Fri, 17 Jan 2025 22:42:09 GMT, Phil Race wrote: >> Rajat Mahajan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> check using not equal to NULL to match the rest of the code in the function > > src/java.desktop/windows/native/libawt/wi

Re: RFR: 8282862: AwtWindow::SetIconData leaks old icon handles if an exception is detected [v6]

2025-01-20 Thread Alexey Ivanov
On Fri, 17 Jan 2025 23:37:01 GMT, Rajat Mahajan wrote: >> src/java.desktop/windows/native/libawt/windows/awt_Window.cpp line 2115: >> >>> 2113: HICON hNewIcon = NULL; >>> 2114: HICON hNewIconSm = NULL; >>> 2115: >> >> I presume we know for sure there's no exception pending when we ente

Re: RFR: 8347916: Simplify javax.swing.text.html.CSS.LengthUnit.getValue

2025-01-20 Thread Alexey Ivanov
On Fri, 1 Nov 2024 14:43:39 GMT, Andrey Turbanov wrote: > Static and non-static `CSS.LengthUnit.getValue` methods essentially do the > same thing. > https://github.com/openjdk/jdk/blob/751a914b0a377d4e1dd30d2501f0ab4e327dea34/src/java.desktop/share/classes/javax/swing/text/html/CSS.java#L3085-L3

Re: RFR: 8282862: AwtWindow::SetIconData leaks old icon handles if an exception is detected [v6]

2025-01-17 Thread Alexey Ivanov
On Fri, 17 Jan 2025 18:22:57 GMT, Rajat Mahajan wrote: >> **Issue:** >> AwtWindow::SetIconData leaks the old icon handles in hOldIcon and hOldIconSm >> if CreateIconFromRaster raises an exception. Additionally, an exception is >> checked only after the first call to CreateIconFromRaster. >> >

Re: RFR: 8347916: Simplify javax.swing.text.html.CSS.LengthUnit.getValue

2025-01-17 Thread Alexey Ivanov
On Fri, 1 Nov 2024 14:43:39 GMT, Andrey Turbanov wrote: > Static and non-static `CSS.LengthUnit.getValue` methods essentially do the > same thing. > https://github.com/openjdk/jdk/blob/751a914b0a377d4e1dd30d2501f0ab4e327dea34/src/java.desktop/share/classes/javax/swing/text/html/CSS.java#L3085-L3

Re: RFR: 8282862: AwtWindow::SetIconData leaks old icon handles if an exception is detected [v2]

2025-01-16 Thread Alexey Ivanov
On Tue, 7 Jan 2025 00:41:57 GMT, Harshitha Onkar wrote: > Is there a way to test this fix or possibly add a test case? @honkar-jdk I don't think it's possible to write a test for this case…. It my be tested by defining [`OUTOFMEM_TEST`](https://github.com/openjdk/jdk/blob/062f2dcfe5b62cc3dd3c2

Re: RFR: 8282862: AwtWindow::SetIconData leaks old icon handles if an exception is detected [v4]

2025-01-16 Thread Alexey Ivanov
On Wed, 15 Jan 2025 21:52:52 GMT, Rajat Mahajan wrote: >> **Issue:** >> AwtWindow::SetIconData leaks the old icon handles in hOldIcon and hOldIconSm >> if CreateIconFromRaster raises an exception. Additionally, an exception is >> checked only after the first call to CreateIconFromRaster. >> >

Re: RFR: JDK-8347377 : Add validation checks for ICC_Profile header fields [v3]

2025-01-14 Thread Alexey Ivanov
On Tue, 14 Jan 2025 18:08:03 GMT, Harshitha Onkar wrote: >> Interesting, this exception is not specified for this method. > > I have changed it back to "Unknown profile class". For that particular > header field ICC Spec doc uses either device class or profile class. > I wanted to be consistent

Re: RFR: 8347370: Unnecessary Hashtable usage in javax.swing.text.html.HTML

2025-01-14 Thread Alexey Ivanov
On Fri, 1 Nov 2024 20:13:31 GMT, Andrey Turbanov wrote: > The Hashtable `javax.swing.text.html.HTML.scMapping` is modified only within > `` block. > We can replace it with immutable map to avoid Hashtable synchronization > overhead. The tests returned green. - Marked as reviewed

Re: RFR: 8344146: Remove temporary font file tracking code.

2025-01-13 Thread Alexey Ivanov
On Mon, 13 Jan 2025 20:10:00 GMT, Phil Race wrote: > > Looks good to me. > > You should bump the year in the updated files to 2025. > > The changes were all made in 2024. Yet the only commit *into the OpenJDK Project* is made in 2025, on January 13, 2025. - PR Comment: https://gi

Re: RFR: 8347370: Unnecessary Hashtable usage in javax.swing.text.html.HTML

2025-01-13 Thread Alexey Ivanov
On Fri, 1 Nov 2024 20:13:31 GMT, Andrey Turbanov wrote: > The Hashtable `javax.swing.text.html.HTML.scMapping` is modified only within > `` block. > We can replace it with immutable map to avoid Hashtable synchronization > overhead. Looks good to me. I'll submit a clientlibs test job and appr

Re: RFR: 8344146: Remove temporary font file tracking code.

2025-01-13 Thread Alexey Ivanov
On Tue, 24 Dec 2024 18:26:06 GMT, Phil Race wrote: > The font data usage tracker only ever did anything if there was a > SecurityManager installed and it restricted access to creating files. > Since there can no longer be a Security Manager this is completely dead code > and should be removed.

Integrated: 8347427: JTabbedPane/8134116/Bug8134116.java has no license header

2025-01-13 Thread Alexey Ivanov
On Fri, 10 Jan 2025 13:14:27 GMT, Alexey Ivanov wrote: > The file `test/jdk/javax/swing/JTabbedPane/8134116/Bug8134116.java` has no > license header. > > I added the GPL header and organised imports. This pull request has now been integrated. Changeset: f67b7036 Author:Alexey

Re: [jdk24] RFR: 8339728: [Accessibility,Windows,JAWS] Bug in the getKeyChar method of the AccessBridge class

2025-01-13 Thread Alexey Ivanov
> > The commit being backported was authored by Abhishek Kumar on 9 Jan 2025 and > was reviewed by Alexey Ivanov, Prasanta Sadhukhan and Alexander Zuev. > > Thanks! Marked as reviewed by aivanov (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/23061#pullrequestreview-2546663615

Re: RFR: 8282862: AwtWindow::SetIconData leaks old icon handles if an exception is detected [v3]

2025-01-10 Thread Alexey Ivanov
On Tue, 7 Jan 2025 19:37:24 GMT, Rajat Mahajan wrote: >> **Issue:** >> AwtWindow::SetIconData leaks the old icon handles in hOldIcon and hOldIconSm >> if CreateIconFromRaster raises an exception. Additionally, an exception is >> checked only after the first call to CreateIconFromRaster. >> >>

RFR: 8347427: JTabbedPane/8134116/Bug8134116.java has no license header

2025-01-10 Thread Alexey Ivanov
The file `test/jdk/javax/swing/JTabbedPane/8134116/Bug8134116.java` has no license header. I added the GPL header and organised imports. - Commit messages: - 8347427: JTabbedPane/8134116/Bug8134116.java has no license header Changes: https://git.openjdk.org/jdk/pull/23034/files

Integrated: 8346581: JRadioButton/ButtonGroupFocusTest.java fails in CI on Linux

2025-01-10 Thread Alexey Ivanov
On Wed, 8 Jan 2025 19:40:29 GMT, Alexey Ivanov wrote: > **Problem:** > > The `javax/swing/JRadioButton/ButtonGroupFocus/ButtonGroupFocusTest.java` > test fails in CI on Linux. > > The focus is on _Button 2_ instead of _Button 4_. > > **Root cause:** > > The a

Re: RFR: 8346581: JRadioButton/ButtonGroupFocusTest.java fails in CI on Linux [v2]

2025-01-09 Thread Alexey Ivanov
On Thu, 9 Jan 2025 20:08:21 GMT, Harshitha Onkar wrote: >> No, `button2FocusLatch` tracks that _Button 2_ gets the initial focus; >> `button2FocusLatch2` tracks that _Button 2_ gets focus for the second time >> in case of repeated `KEY_PRESS` event for the Tab key. >> >> If `button2FocusLatch2

Re: RFR: 8346581: JRadioButton/ButtonGroupFocusTest.java fails in CI on Linux [v2]

2025-01-09 Thread Alexey Ivanov
On Thu, 9 Jan 2025 00:00:48 GMT, Harshitha Onkar wrote: >> Alexey Ivanov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Replace AWTEventListener and PropertyChangeListener with lambdas > > tes

Re: RFR: 8346581: JRadioButton/ButtonGroupFocusTest.java fails in CI on Linux [v2]

2025-01-09 Thread Alexey Ivanov
facilitate failure analysis. > > Take a screenshot of the test frame in case of failure. > > These CI hosts seem to be quite slow, removing the delay added by > `robot.setAutoDelay(100)` has reduced the number of unexpected `KEY_PRESS` > events. This didn't affect Win

Re: RFR: 8346581: JRadioButton/ButtonGroupFocusTest.java fails in CI on Linux

2025-01-09 Thread Alexey Ivanov
On Thu, 9 Jan 2025 18:57:28 GMT, Damon Nguyen wrote: >> **Problem:** >> >> The `javax/swing/JRadioButton/ButtonGroupFocus/ButtonGroupFocusTest.java` >> test fails in CI on Linux. >> >> The focus is on _Button 2_ instead of _Button 4_. >> >> **Root cause:** >> >> The additional logging reveal

Re: RFR: 8346581: JRadioButton/ButtonGroupFocusTest.java fails in CI on Linux

2025-01-09 Thread Alexey Ivanov
On Thu, 9 Jan 2025 18:52:58 GMT, Damon Nguyen wrote: >> **Problem:** >> >> The `javax/swing/JRadioButton/ButtonGroupFocus/ButtonGroupFocusTest.java` >> test fails in CI on Linux. >> >> The focus is on _Button 2_ instead of _Button 4_. >> >> **Root cause:** >> >> The additional logging reveal

Re: RFR: 8346036: Unnecessary Hashtable usage in javax.swing.text.html.parser.Entity

2025-01-09 Thread Alexey Ivanov
On Thu, 9 Jan 2025 12:44:14 GMT, ExE Boss wrote: >> src/java.desktop/share/classes/javax/swing/text/html/parser/Entity.java line >> 2: >> >>> 1: /* >>> 2: * Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights >>> reserved. >> >> Needs to be updated to 2025? > > Leaving this as

RFR: 8346581: JRadioButton/ButtonGroupFocusTest.java fails in CI on Linux

2025-01-08 Thread Alexey Ivanov
**Problem:** The `javax/swing/JRadioButton/ButtonGroupFocus/ButtonGroupFocusTest.java` test fails in CI on Linux. The focus is on _Button 2_ instead of _Button 4_. **Root cause:** The additional logging revealed, an expected `KEY_PRESS` event. The test uses `Robot` API to press the Tab key an

Re: RFR: JDK-8344907 : NullPointerException in Win32ShellFolder2.getSystemIcon when "icon" is null [v4]

2025-01-08 Thread Alexey Ivanov
On Wed, 8 Jan 2025 19:10:59 GMT, Harshitha Onkar wrote: >> Win32ShellFolder2.getSystemIcon() can result in NPE if icon is null. Sanity >> null checks have been added. >> >> >> long hIcon = getSystemIcon(iconType.getIconID()); //Can return null >> Image icon = makeIcon(hIcon); // returns null i

Re: RFR: 8346887: DrawFocusRect() may cause an assertion failure

2025-01-08 Thread Alexey Ivanov
On Wed, 8 Jan 2025 16:36:07 GMT, Dmitry Markov wrote: > On Windows debug build execution of `DrawFocusRect()` may cause an assertion > failure. In particular if a component, which is going to gain a focus, has > zero size, the function returns `0` because focus rectangle is empty. > > It is ne

<    1   2   3   4   5   6   7   8   9   10   >