| Ticket UUID: | 2864685 | |||
| Title: | Compiz animates each menu item as a new window | |||
| Type: | Bug | Version: | obsolete: 8.5.7 | |
| Submitter: | muranyia | Created on: | 2009-09-23 00:06:25 | |
| Subsystem: | 12. Unix Menus | Assigned To: | dkf | |
| Priority: | 9 Immediate | Severity: | ||
| Status: | Closed | Last Modified: | 2009-12-09 17:46:51 | |
| Resolution: | Fixed | Closed By: | patthoyts | |
| Closed on: | 2009-12-08 21:50:41 | |||
| Description: |
Compiz somehow thinks that the menus of these apps are separate windows and applies window open and close animation to them. Thus each submenu "pulses" like ordinary window when opened and navigating a menu (specially one with zero delay) looks like a firework. | |||
| User Comments: |
dkf added on 2009-12-09 17:46:51:
A slightly larger patch allows us to determine (at a good guess) whether we have dropdowns or popups. Applied. patthoyts added on 2009-12-09 04:50:41: allow_comments - 1 patthoyts added on 2009-12-09 04:50:40: Applied this patch to HEAD and to 8.5 branch. A separate patch (possibly done as a TIP) will be done to make it possible to handle the combobox dropdowns, tooltips and other window types from script level. dkf added on 2009-12-08 16:30:03: File Added - 354315: menu.patch egavilan added on 2009-12-08 02:27:13: Sorry, forgot to attach patch's URL: http://paste.tclers.tk/1887 egavilan added on 2009-12-08 02:26:27: Updated patch with feedback and code from patthoyts. Menus show sensible behaviour in both normal and tornoff states now. Patch against HEAD. egavilan added on 2009-12-07 22:01:59: You are right (I was reading an old version of the document). I tried setting _NET_WM_WINDOW_TYPE_MENU for torn-off menus and _NET_WM_WINDOW_TYPE_DROPDOWN_MENU for normal menus. The result is the same for normal (override-redirect) menus, but for torn-off menus the result is a window which doesn't have an icon in the applications bar but is not transient of the [winfo toplevel $menu] . This can resut in the menu going bottom of the window stack without the user noticing. I think we can do two things in this scenario: * For torn-off menus, we set _NET_WM_WINDOW_TYPE_NORMAL and it behaves like a normal (animated) window. This is the default now. * For torn-off menus, we set _NET_WM_WINDOW_TYPE_MENU and WM_TRANSIENT_FOR to make the menu transient of its toplevel, so it doesn't get lost behind other windows. I don't think Tk can distinguish between a "normal" menu and a "popup" menu, so _NET_WM_WINDOW_TYPE_POPUP_MENU is out of discussion. dkf added on 2009-12-07 00:32:46: Note that these additional properties were not described in EWMH 1.3, but instead form part of EWMH 1.4. dkf added on 2009-12-07 00:02:11: Actually, it wants to be one of: 1. _NET_WM_WINDOW_TYPE_MENU - for torn off menus 2. _NET_WM_WINDOW_TYPE_DROPDOWN_MENU - for "real" menus from the menubar 3. _NET_WM_WINDOW_TYPE_POPUP_MENU - for menus that are neither of the other two (i.e. posted with tk_popup) egavilan added on 2009-12-06 00:21:14: Apparently new window managers expects additional information to be set about what the function of the window is. More precisely, it expects the _NET_WM_WINDOW_TYPE property to be set to _NET_WM_WINDOW_TYPE_MENU for menu windows. See http://standards.freedesktop.org/wm-spec/1.3/ar01s05.html . A patch against HEAD (5 dec 2009) adds this information to menu windows on x11. As a result, the new property is set for menu windows as shown by xprop output: _NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_MENU For the patch, see http://paste.tclers.tk/1880 dkf added on 2009-11-30 01:43:57: The menu code is very scattered over different files, but the key part appears to be in tkUnixWm.c in the function to create the actual X window for the menu (TkpMakeMenuWindow). If I'm reading that function right, the override_redirect flag is not being set on the menu until after the window is created, and maybe compiz is not noticing that. Can't tell, as I'm not a user of the right platform... | |||
Attachments:
- menu.patch [download] added by dkf on 2009-12-08 16:30:03. [details]
