RFR: 8286872: Refactor add/modify notification icon (TrayIcon)
Alexey Ivanov
aivanov at openjdk.java.net
Tue May 17 13:11:14 UTC 2022
Encapsulate the logic of adding or modifying a notification icon aka tray icon. This is to avoid code duplication between [`AwtTrayIcon::WmTaskbarCreated`](https://github.com/openjdk/jdk/blob/7b988b31c661c6e3e58cf8ced81732e40a79d4f5/src/java.desktop/windows/native/libawt/windows/awt_TrayIcon.cpp#L477) and [`AwtTrayIcon::_UpdateIcon`](https://github.com/openjdk/jdk/blob/7b988b31c661c6e3e58cf8ced81732e40a79d4f5/src/java.desktop/windows/native/libawt/windows/awt_TrayIcon.cpp#L796).
Separating adding and modifying the icon simplifies the methods, the actions are clearer: adding the icon requires sending `NIM_SETVERSION` message whereas modifying the icon doesn't.
-------------
Depends on: https://git.openjdk.java.net/jdk/pull/8441
Commit messages:
- 8286872: Refactor add/modify notification icon (TrayIcon)
Changes: https://git.openjdk.java.net/jdk/pull/8749/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8749&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8286872
Stats: 26 lines in 2 files changed: 17 ins; 4 del; 5 mod
Patch: https://git.openjdk.java.net/jdk/pull/8749.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8749/head:pull/8749
PR: https://git.openjdk.java.net/jdk/pull/8749
More information about the client-libs-dev
mailing list