Summary: | [bug] Weston titlebar right-click menu timing issue | ||
---|---|---|---|
Product: | Wayland | Reporter: | Brian Lovin <brian.j.lovin> |
Component: | weston | Assignee: | Wayland bug list <wayland-bugs> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Brian Lovin
2012-07-24 17:42:46 UTC
I was looking at this bug earlier and found that it's because of this if statement in weston's clients/window.c: if (state == WL_POINTER_BUTTON_STATE_PRESSED && time - menu->time > 500) {...} One can change the time - menu->time compare to > 100 and clicking an item is much snappier, but it seems that this timeout may not be a bug as it is explicitly written this way. Still a bug, should it be fixed? I also noticed this comment bellow: /* Either relase after press-drag-release or * click-motion-click. */ Which raises another interesting issue with the menu - it doesn't act like the comment suggests, which is the way menus work in X11 and Windows so it seems this is another bug. (The menu commits it's action as soon as the mouse button is depressed, as the if statement says, instead of when the mouse button is released as X11/Win do) I'll leave it in this BZ as another item to fix if it is a bug. Tested with these sys environments: glproto master ec1eec4355ee4a6c5134f2178192f10b6d28a87a mesa master 4e087de51ad0e7ba4a7199d3664e1d096f8dc510 wayland master b57694ca0e9dc7d2845ce9fb0ac9c4b0ebc940ce pixman master 09cb1ae10b1976970233c934d27c36e0a4203e1c wayland-test master 14cdb54b5f9320aac9dd3c4dfe490952a40b0250 weston master 4272e639912cac247a04c49ce2a6216100aab65a drm master 6fa2b29d226306870eebe93afb2106ca7d79569b efl http://svn.enlightenment.org/svn/e/trunk 74948 cairo master 95b7f4fe3a5deea6766538d843c75626e4bb68cf libX11 master 8042f88ace33573f9d0dfaa21ed54ac7cef266d5 macros master 0890e4003aacfa7113ab3f4e3ad7c5636f8e922a libxkbcommon master 4c21275301c453757196d9aa74c00861c0d0d54f dri2proto master 4eeacce4c4a300b938b7e3fb78a8e443c491780b kbproto master 391a1f6de6315fc0196d407d800597488315cccb commit d2fbb3870cfaea623a87ba28c9587676bbdc93f7 Author: Kristian Høgsberg <krh@bitplanet.net> Date: Tue Oct 30 13:45:22 2012 -0400 window: Make press-drag-release menu selection mode work The intended behavior is that a quick click (press and then release within 500ms) just pops up the menu and doesn't select anything. Then we can mouse around and and click to select an item. Alternatively, a click and hold (ie press and release after 500ms) lets you press right button, mouse down on the menu item you want and release to select it. This is how menus work in most toolkits. The handling in weston is fine, it's there to handle the case where the button release happens outside any client window, since the client doesn't get those events. If such a release happens late or we get a second release outside the popup window we shut down the popup. The problem is in toytoolkit, where we need to select the item if we get a release within 500ms or if we get a second release. A second release is the case where the first release came after 500ms and didn't pop down the menu, and the second release event is from a click on a menu item. https://bugs.freedesktop.org/show_bug.cgi?id=52456 Changing to verified. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.