http://bugs.winehq.org/show_bug.cgi?id=9437
Summary: QIP window should not have WM titlebar Product: Wine Version: CVS/GIT Platform: Other URL: http://www.qip.ru OS/Version: other Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-x11driver AssignedTo: wine-bugs@winehq.org ReportedBy: lich@math.spbu.ru
Created an attachment (id=7767) --> (http://bugs.winehq.org/attachment.cgi?id=7767) qip titlebars
QIP now has two titlebars: its own and WM's.
The patch caused this bug:
commit f48eb1581dfe176043cbca5c46400c0f86eb5552 Author: Alexandre Julliard julliard@winehq.org Date: Mon Aug 20 22:06:50 2007 +0200
winex11: Force a window to managed mode when it is activated.
commit ac98e0c07535af4a373c0af343498903e2ff42a6 Author: Alexandre Julliard julliard@winehq.org Date: Mon Aug 20 22:06:33 2007 +0200
As I understand, this patch makes every active window managed.
http://bugs.winehq.org/show_bug.cgi?id=9437
--- Comment #1 from Kirill K. Smirnov lich@math.spbu.ru 2007-08-27 10:15:45 --- Created an attachment (id=7831) --> (http://bugs.winehq.org/attachment.cgi?id=7831) winhelp popup window has caption
winhelp (wine version) popup windows suffer too: innocent styles: window: WS_POPUP | WS_BORDER swp: SW_SHOW
http://bugs.winehq.org/show_bug.cgi?id=9437
--- Comment #2 from Alexandre Julliard julliard@winehq.com 2007-08-27 11:01:57 --- It works fine here, the window is managed but that's the right thing to do for this app IMO. It sounds like your window manager doesn't implement mwm hints properly.
http://bugs.winehq.org/show_bug.cgi?id=9437
--- Comment #3 from Kirill K. Smirnov lich@math.spbu.ru 2007-08-27 11:16:06 ---
It sounds like your window manager doesn't implement mwm hints properly.
That's strange. I believe KDE is not so stupid not to understand mwm hints.
$ kde-config --version Qt: 3.3.6 KDE: 3.5.4 kde-config: 1.0
Does I understand correct, that being managed is the same as having a WM title?
Also, winamp (www.winamp.com, old-style skin) is the another application that should not have a titlebar, but it has.
http://bugs.winehq.org/show_bug.cgi?id=9437
--- Comment #4 from Alexandre Julliard julliard@winehq.com 2007-08-27 11:27:26 ---
Does I understand correct, that being managed is the same as having a WM title?
No, windows can be managed without a WM title, Wine sets the mwm hints depending on the win32 style, and then it's up to the WM to display or not the appropriate decorations.
http://bugs.winehq.org/show_bug.cgi?id=9437
--- Comment #5 from Kirill K. Smirnov lich@math.spbu.ru 2007-08-27 11:37:46 ---
No, windows can be managed without a WM title, Wine sets the mwm hints depending on the win32 style, and then it's up to the WM to display or not the appropriate decorations.
Thanks for explanation, it clears many things for me!!
It works fine here, the window is managed but that's the right thing to do for this app IMO.
I think, being managed for QIP is a really bad idea (right now). Let's consider the following situation:
0) Switch to Virtual desktop #1 1) Start QIP 2) Activate qip by clicking on systray icon (if qip is not already active) 3) switch to another virtual desktop (#2). Before this bug qip had the single window available in all virtual desktops, but now only in #1. 4) click on systray icon to summon qip buddy list. It will not appear on desktop #2, and the instance in desktop #1 stop responding. Only restart heals the situation.
This behaviour is observed under KDE. Do other WMs handle this case correct? Or is it another wine bug?
http://bugs.winehq.org/show_bug.cgi?id=9437
--- Comment #6 from Alexandre Julliard julliard@winehq.com 2007-08-27 12:23:30 --- These sorts of things can usually be configured in the WM. You can make a window sticky to have it show on all desktops, you can configure where dialogs appear, etc. All this is policy that's up to the WM.
http://bugs.winehq.org/show_bug.cgi?id=9437
L. Rahyen mail@science.su changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mail@science.su
--- Comment #7 from L. Rahyen mail@science.su 2007-08-28 00:02:52 ---
This behaviour is observed under KDE. Do other WMs handle this case correct? > Or is it another wine bug?
I'm using KDE and have no such problems you describe here. I can make any window sticky on all desktops with one single click. Even if the window doesn't have title bar I can press Alt+F3 and click To Desktop -> All desktops. Of course if I want any program to be always on all desktops I can configure this permanently in "Configure Window Behaviour..." dialog (you can open it via Alt+F3 key or just click menu icon if window has a title bar).
In other words problems you describe here are not WINE bugs. They are not WM bugs either. This just misconfiguration of your WM because if you want to make a program or any specific window to be available on all desktops you can tell this KDE and it will take care about this; no more actions in future will be necessary if you have used permanent configuration in Window Behavior dialog.
What about title bars you can hide them using Window Behaviour dialog (either temporary or permanently for any given window/program) by doing few simple clicks.
All of above is true for KDE 3 and above.
http://bugs.winehq.org/show_bug.cgi?id=9437
--- Comment #8 from Kirill K. Smirnov lich@math.spbu.ru 2007-08-28 05:05:35 --- Yes, I can remove WM titlebar using WM facilities, but is just hides the wine bug. I think I found it:
Alexandre's patch did not introduce the bug, but revealed.
All these windows has style 0 (WS_OVERLAPPED) - no caption. CreateWindowEx for unknown reason does not like this style and forces it to be WS_CAPTION.
user32/win.c (line 1010): /* * Correct the window styles. * * It affects only the style loaded into the WIN structure. */
if ((wndPtr->dwStyle & (WS_CHILD | WS_POPUP)) != WS_CHILD) { wndPtr->dwStyle |= WS_CLIPSIBLINGS; if (!(wndPtr->dwStyle & WS_POPUP)) wndPtr->dwStyle |= WS_CAPTION; }
What is the purpose of this correction??? I feel it is wrong. Pure overlapped windows (like qip and winamp) must not have caption! When I commented it out, qip and winamp begin working correct.
http://bugs.winehq.org/show_bug.cgi?id=9437
--- Comment #9 from Kirill K. Smirnov lich@math.spbu.ru 2007-08-28 06:08:01 ---
When I commented it out, qip and winamp begin working correct.
I've mistake here, only winamp began to work, sorry.
Another considerations:
qip main window itself is tool window, which has narrow titlebar.
1) This type of windows should have specific MWM hints. Currently only window type is set.
window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_UTILITY);
I do not know is there such specific MWM hint. If there isn't such hint, why do not let this window be unmanaged?
2) Should is_window_managed function check for WS_EX_TOOLWINDOW BEFORE checking for (swp_flags & (SWP_NOACTIVATE|SWP_HIDEWINDOW))?
http://bugs.winehq.org/show_bug.cgi?id=9437
--- Comment #10 from Dmitry Timoshkov dmitry@codeweavers.com 2007-08-28 08:45:30 ---
if ((wndPtr->dwStyle & (WS_CHILD | WS_POPUP)) != WS_CHILD) { wndPtr->dwStyle |= WS_CLIPSIBLINGS; if (!(wndPtr->dwStyle & WS_POPUP)) wndPtr->dwStyle |= WS_CAPTION; }
What is the purpose of this correction???
The purpose of this correction is to match what Windows does.
http://bugs.winehq.org/show_bug.cgi?id=9437
--- Comment #11 from L. Rahyen mail@science.su 2007-08-28 10:03:19 ---
I do not know is there such specific MWM hint.
Yes, in KDE's WM there is such type of windows. However, I don't know how to implement this (I'm programmer but not GUI-programmer, sorry).
If there isn't such hint, why do not let this window be unmanaged?
By default, no windows should be on all desktops. If something available on all desktops on top of *everything* and it is impossible to get rid of it this is very stupid and annoying bug. In fact, current WINE is much better than previous versions. Now we have almost correct behavior. "Almost" means there still some work to be done.
Personally, I really hate unmanaged windows. I have 24 desktops (12 desktops on each monitor), have a lot of Windows programs running. Current behavior gives me a chance to get rid of some (very unflexible) virtual desktops because now much more programs work correctly in Linux environment.
Just relevant example: in the account of my brother he has a Windows program Mousotron. Expected behavior for this program is to be on all desktops. But because it is unmanaged it is even impossible to watch full screen video (it will be on top of it). Minimizing to tray each time isn't acceptable of course (especially if you just want to watch video with length of 5-30 seconds). Using virtual desktop was too ugly so I was forced to write a wrapper script for some full screen programs so they can hide it (by killing it) when necessary and bring it back again. I didn't test it with new WINE yet on his computer but I guess it will work much better now if it will become managed.
What all above means? Unmanaged windows with no possibility to make them managed is very ugly bug in many cases because such behavior brakes WM's rules. In windows there is no desktops but even there programs like Mousotron don't persist on top if you run full screen application.
What about this bug, I see here only two real problems:
qip main window itself is tool window, which has narrow titlebar.
1) This problem is "trivial" one (type of window title). In anyway, In Linux (both GNOME and KDE) default behavior is to be on one desktop and don't use on-top-of-all-windows attribute except where this is really necessary. If user needs special behavior and knows the basics of his/her WM he/she can change settings as he/she wants with few simple clicks. That means even if this will be fixed qip's window will be on one desktop by default anyway because this is the default in the WM for this window-style.
2) This problem is "minor" bug (because easy and obvious workaround is available). The program (qip) hangs if it is on one desktop but you try to use some its functions via tray icon on another desktop.
Hope I understood everything correctly. Anyway it should be decided what this bug is about (problem #1 or #2). Please note that unmanaged style don't comply with Windows behavior because even titlebar-less or on-top-of-all programs in Windows *don't* stay on top if you run full screen application like video player or game. WINE should comply with Windows behavior.
http://bugs.winehq.org/show_bug.cgi?id=9437
--- Comment #12 from Kirill K. Smirnov lich@math.spbu.ru 2007-08-28 10:50:11 ---
By default, no windows should be on all desktops. If something available on all desktops on top of *everything* and it is impossible to get rid of it this is very stupid and annoying bug. In fact, current WINE is much better than previous versions. Now we have almost correct behavior. "Almost" means there still some work to be done.
I do not propose to left qip in all desktops, I just want to aviod qip window hanging. It happens because qip uses minimize-to-tray technique which do not live together with taskbar.
QIP window should not appear in taskbar since it is toolwindow (Previously I thought it is 'managed', but Alexandre explained me I was wrong) which leads to hanging. Really I do not want qip window be unmanaged but: 1) Do not have two titlebars. 2) Do not hang if I click on systray icon.
Yes, it is obvious how to keep managed windows in all desktops via KDE facility. I taught it to bypass taskbar, but HOW REMOVE ADDITIONAL TITLEBAR? What type of window should I set?
Anyway, qip should not have titlebar even with default WM settings. It is the bug to deal with.
P.S. I found bug #8300 which looks like similar but not the same. I'll post there additional information.
http://bugs.winehq.org/show_bug.cgi?id=9437
--- Comment #13 from Alexandre Julliard julliard@winehq.com 2007-08-28 11:01:26 --- Created an attachment (id=7858) --> (http://bugs.winehq.org/attachment.cgi?id=7858) Remove decorations on tool windows
Give this patch a try.
http://bugs.winehq.org/show_bug.cgi?id=9437
--- Comment #14 from Kirill K. Smirnov lich@math.spbu.ru 2007-08-28 11:21:49 ---
Give this patch a try.
Great! Alexandre, it healed both qip and winamp main window! Thanks!
But winamp playlist and winhelp popup windows are still have captions. I suspect winhelp is buggy itself - it should have WS_EX_TOOLWINDOW flag. I'll test it a bit later.
http://bugs.winehq.org/show_bug.cgi?id=9437
--- Comment #15 from Kirill K. Smirnov lich@math.spbu.ru 2007-08-28 11:47:47 --- Created an attachment (id=7859) --> (http://bugs.winehq.org/attachment.cgi?id=7859) background attached to qip main window after patch.
I've tried to resize and move qip window. It does not work correct neither after/before proposed patch.
http://bugs.winehq.org/show_bug.cgi?id=9437
--- Comment #16 from Kirill K. Smirnov lich@math.spbu.ru 2007-08-28 11:48:13 --- Created an attachment (id=7860) --> (http://bugs.winehq.org/attachment.cgi?id=7860) junk attached to qip main window before patch.
I've tried to resize and move qip window. It does not work correct neither after/before proposed patch.
http://bugs.winehq.org/show_bug.cgi?id=9437
--- Comment #17 from Kirill K. Smirnov lich@math.spbu.ru 2007-08-28 11:54:36 --- The picture attachments right above may look unrelated to this bug, but they demonstrate that toolwindow must have certain mwm hint (am I right?), not just 0 as proposed in the patch.
http://bugs.winehq.org/show_bug.cgi?id=9437
Kirill K. Smirnov lich@math.spbu.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #18 from Kirill K. Smirnov lich@math.spbu.ru 2007-08-31 07:04:56 --- Bugfix for original bug (bogus title) has been applied, so let's close it. http://source.winehq.org/git/wine.git/?a=commit;h=74cd76c9c7c448a4161b87509e...
http://bugs.winehq.org/show_bug.cgi?id=9437
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #19 from Dan Kegel dank@kegel.com 2008-01-28 05:22:12 --- Closing all RESOLVED FIXED bugs more than three months old.
http://bugs.winehq.org/show_bug.cgi?id=9437
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|CVS/GIT |unspecified