https://bugs.winehq.org/show_bug.cgi?id=57349
Bug ID: 57349 Summary: Nikon NX Studio: Transparent overlay windows drawn at outside app window Product: Wine Version: 9.20 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: christoph.bartoschek@gmail.com Distribution: ---
Created attachment 77316 --> https://bugs.winehq.org/attachment.cgi?id=77316 Cropping window outside main window.
For several versions Wine does not properly show several pieces of information for Nikon NX Studio:
- Cropping tool overlay - Image Histogram - Image information.
The problem is that the overlays are outside of the main window and seem to be positioned at (0, 0). This documentation show how it should look like:
- https://nikonimglib.com/nxstdo/onlinehelp/en/the_bottom_toolbar_11.html - https://nikonimglib.com/nxstdo/onlinehelp/en/cropping_pictures_38.html
The histogram and image information screens however look like this: https://bugs.winehq.org/attachment.cgi?id=77257. I attach an image of how the cropping window looks like. One can see a transparent overlay that is meant to darken the image and the currently selected area in the middle. I can change the inner part of the crop by holding the left mouse button and moving over the picture (not the window outside of the picture).
All three overlays are transparent and use EX_WS_LAYERED. This excerpt from winedbg shows the window hierarchy:
00010a8e AfxWnd140u 54000000 0000000000000000 00000024 Image Panel 00010a90 AfxWnd140u 50000000 0000000000000000 00000024 -- Empty -- 00010a92 ScrollBar 50000000 0000000000000000 00000024 -- Empty -- 00010a94 ScrollBar 50000001 0000000000000000 00000024 -- Empty -- 00010a96 AfxWnd140u 50000000 0000000000000000 00000024 Image Screen 00010a98 AfxWnd140u 40000000 0000000000000000 00000024 SNS Logout 00020aae AfxWnd140u 40000000 0000000000000000 00000024 HDR Window 00010b4a AfxWnd140u 42000000 0000000000000000 00000024 Movie Window 00490bbc AfxWnd140u 50000000 0000000000000000 00000024 InfoScreen 00060bba AfxWnd140u 50000000 0000000000000000 00000024 Histogram Scre 00010ab0 AfxWnd140u 50000000 0000000000000000 00000024 ImageFrameScre
Info Screen and Histogram Screen are children of Image Screen and Image Panel. I assume one of the two is the picture area in the main window. As children they should be positioned relative to the parent and be moved together with it.
xwininfo gives the following output on the CropScreen:
wininfo: Window id: 0x57000c7 "CropScreen"
Absolute upper-left X: 0 Absolute upper-left Y: 0 Relative upper-left X: 0 Relative upper-left Y: 0 Width: 1530 Height: 1081 Depth: 32 Visual: 0x23 Visual Class: TrueColor Border width: 0 Class: InputOutput Colormap: 0x57000c6 (not installed) Bit Gravity State: NorthWestGravity Window Gravity State: NorthWestGravity Backing Store State: NotUseful Save Under State: no Map State: IsViewable Override Redirect State: yes Corners: +0+0 -2310+0 -2310-1079 +0-1079 -geometry 1530x1081+0+0
One additional aspect of the problem is that the overlay windows are always on top even if the main window is minimized.
When I run inside of a virtual dekstop the overlays show as black windows and they are also outside of the main window: https://bugs.winehq.org/attachment.cgi?id=77258
https://bugs.winehq.org/show_bug.cgi?id=57349
--- Comment #1 from Christoph Bartoschek christoph.bartoschek@gmail.com --- I have created a small testcase program that reproduces the problem and attach it to the bug. This is how I compile the program:
tar -xzf testcase-layered-window.tgz cd testcase-layered-window x86_64-w64-mingw32-windres main.rc -o manifest.o x86_64-w64-mingw32-c++ -static -mwindows main.cc manifest.o -lgdi32 -o testcase-layered.exe wine testcase-layered.exe
When run the program shows a window with a green box. On top of the green box there should be a red layered window with alpha=128. However the layer is not positioned on top of its parent window but at the absolute top. I also attach an image of how this looks like under wine and how it looks on Windows 11 (running under VirtualBox)
https://bugs.winehq.org/show_bug.cgi?id=57349
--- Comment #2 from Christoph Bartoschek christoph.bartoschek@gmail.com --- Created attachment 77321 --> https://bugs.winehq.org/attachment.cgi?id=77321 Testcase showing the problem with layered windows
https://bugs.winehq.org/show_bug.cgi?id=57349
--- Comment #3 from Christoph Bartoschek christoph.bartoschek@gmail.com --- Created attachment 77322 --> https://bugs.winehq.org/attachment.cgi?id=77322 Screenshot of the testcase on Wine and on Windows 11.
A screenshot showing how the testcase program looks like on wine vs Windows 11.
https://bugs.winehq.org/show_bug.cgi?id=57349
Christoph Bartoschek christoph.bartoschek@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Nikon NX Studio: |Support layered child |Transparent overlay windows |windows |drawn at outside app window |