[Bug 60128] New: Problem with resizing X11 decorated windows in Linux Mint Cinnamon (Muffin WM)
http://bugs.winehq.org/show_bug.cgi?id=60128 Bug ID: 60128 Summary: Problem with resizing X11 decorated windows in Linux Mint Cinnamon (Muffin WM) Product: Wine Version: 11.13 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winex11.drv Assignee: wine-bugs@list.winehq.org Reporter: empcomputer@outlook.com.au Target Milestone: --- Distribution: --- Created attachment 81701 --> http://bugs.winehq.org/attachment.cgi?id=81701 Notepad after launch - OK Running Linux Mint 22.3 Cinnamon. If window manager decorations are enabled and a window is resized/maximised/restored, mouse coordinates are reported incorrectly, resulting in an offset between the on-screen cursor position and hit point. Also manifests as a menu activated by keyboard accelerators appearing in incorrect position. I have found that, under certain conditions (can't see a clear pattern, but seems to depend on window position and size), the window manager triggers ConfigureNotify events for the client window before the parent (frame) window. When this happens, the X11 driver computes the window rectangles using the old frame coordinates, leading to the offset problem described earlier. If window manager decorations are disabled, the problem does not occur (there is no frame window in that case). Simple repro steps: - Ensure that "Allow the window manager to decorate the windows" and "Allow the window manager to control the windows" options are checked - Ensure that "Emulate a virtual desktop" is UNchecked - Launch Notepad - Position the window approximately in the centre of the screen (away from the top-left corner) - Maximise the window - Pull down a menu using the keyboard (e.g. Alt+F or Alt+H) - Note that the menu appears away from the expected position - If you restore the window, you'll notice a similar effect (with reversed offsets) - Moving the window using the title bar corrects the coordinates The problem was first noticed in Wine 11.13, but testing shows that it goes back as far as ~10.0. It is more pronounced/consistent in 11.13, but can be triggered sporadically in some earlier versions as well. After looking through the code and some experimenting, one possible fix is to modify the "host_window_map_point" function to use XTranslateCoordinates. I'm not sure if it's the best solution; I imagine there's a good reason it was coded the way it is (e.g. performance issues due to X protocol overhead - I haven't looked into it enough). I hope I have at least provided a good starting point. I'll also note that I have tested it with a few other window managers (Xfwm, Metacity and Compiz, running Linux Mint 22.3 Xfce Live ISO in VirtualBox) and they did not exhibit the same problem. (More attachments to follow...) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60128 --- Comment #1 from Ned M <empcomputer@outlook.com.au> --- Created attachment 81702 --> http://bugs.winehq.org/attachment.cgi?id=81702 Notepad Help menu after maximising -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60128 --- Comment #2 from Ned M <empcomputer@outlook.com.au> --- Created attachment 81703 --> http://bugs.winehq.org/attachment.cgi?id=81703 Notepad Help menu after restoring -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60128 --- Comment #3 from Ned M <empcomputer@outlook.com.au> --- Created attachment 81704 --> http://bugs.winehq.org/attachment.cgi?id=81704 Windows program showing rectangles and mouse position This simple program displays the window and client rectangle coordinates after moving or resizing the window. If you press the left mouse button inside the client area, it will draw a cross at the (reported) mouse position, allowing you to observe the coordinate offset. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60128 --- Comment #4 from Ned M <empcomputer@outlook.com.au> --- Created attachment 81705 --> http://bugs.winehq.org/attachment.cgi?id=81705 X11 client program This (Linux) program creates an X window and outputs details about some events in the terminal, allowing you to see the order in which events are sent. A "*" is printed after the window number of the client window to make it easier to identify in the list. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60128 Ken Sharp <imwellcushtymelike@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60128 Ned M <empcomputer@outlook.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |Mint -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60128 --- Comment #5 from Ned M <empcomputer@outlook.com.au> --- OK, I have some further info which may help decide how to proceed. I believe I have tracked down the code in Muffin which is responsible for the observed behaviour. GitHub permalink: https://github.com/linuxmint/muffin/blob/6ed5907a15ae5614c74682f8c736745f4b3... I can understand their rationale for handling it the way they did; I think the grow/shrink testing code is buggy (seems consistent with the observed symptoms of depending on the window size and position), but even if it were correct, it would still affect the window configuration order, which doesn't play nicely with the Wine X11 driver. I see that Muffin always configures the frame window first if an extended sync counter is used by the client, however I have a feeling that implementing this in Wine could be unnecessarily complex. Please let me know if you need any more data. I imagine there could be a fair number of Cinnamon/Muffin users out there that would be affected by this, so hopefully a good solution can be found. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60128 --- Comment #6 from Ned M <empcomputer@outlook.com.au> --- Still present in 11.15 release and latest master (1d3e3ed5750f9321cde62688b4647f077a79918c). Also, if anyone would like pre-built executables for testing, I'd be happy to upload those. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla