Currently, this feature does not work in ozone/wayland. Fix it!
Here is cl https://chromium-review.googlesource.com/c/chromium/src/+/1078248. Adding more people to gain more attention to it.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/190d7012912f8d28c676ae534b18df3d33edab86 commit 190d7012912f8d28c676ae534b18df3d33edab86 Author: Maksim Sisov <msisov@igalia.com> Date: Wed Oct 03 08:14:42 2018 [ozone/wayland] Allow window interactions (move, resize, double click and etc). There is a new class called WmMoveResizeHandler in ui/platform_window/dir now. This class can be set as a property value to the PlatformWindow, which is derived from the PropertyHandler now. That is, whenever a platform, which implements a platform window supports interactive move/resize events, it can implement a WmMoveResizeHandler and call SetWmMoveResizeHandler to set the handler. DesktopWindowTreeHostPlatform creates a WindowEventFilter now, which is a pre target handler for double click and window interaction events (move,resize). It also gets a handler from the PlatformWindow and sets it to the WindowEventFilter. The handler can be null, which will mean the non-client events won't be handled. When an event comes, it is tested against possible hittest values and whether it's a left click event. If the test is positive, the last mouse pointer location is taken and DispatchHostWindowDragMovement is called. The DispatchHostWindowDragMovement call passes the hittest and the pointer location values to a set |handler_| if it exists, which has its own platform specific implementation to request a server to start move/resize interactions. For example, in case of Wayland, xdg_surface_move or xdg_surface_resize methods are used. In case of X11, _NET_WM_MOVERESIZE message atom along with the last mouse pointer location are sent, and an x11 server grabs a pointer and starts move/resizing operation on a window. The events are also marked as non-client to ensure mouse handlers are not stuck in a "mouse pressed mode" until release events are sent. Normally, when platforms starts interactive move/resize, release events are never sent by compositors, which results in the above mentioned problem. Bug: 854564 TEST: XdgVersionV5Test/WaylandWindowTest.DispatchWindowMove/0, XdgVersionV5Test/WaylandWindowTest.DispatchWindowResize/0, XdgVersionV6Test/WaylandWindowTest.DispatchWindowMove/0, XdgVersionV6Test/WaylandWindowTest.DispatchWindowResize/0. Change-Id: I30f9fc50d9ab50c4cb7c6e76a0a8723015e3c777 Reviewed-on: https://chromium-review.googlesource.com/c/1078248 Commit-Queue: Maksim Sisov <msisov@igalia.com> Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Robert Kroeger <rjkroege@chromium.org> Cr-Commit-Position: refs/heads/master@{#596147} [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/ozone/platform/wayland/BUILD.gn [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/ozone/platform/wayland/DEPS [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/ozone/platform/wayland/fake_server.cc [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/ozone/platform/wayland/fake_server.h [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/ozone/platform/wayland/wayland_connection.cc [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/ozone/platform/wayland/wayland_connection.h [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/ozone/platform/wayland/wayland_pointer.cc [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/ozone/platform/wayland/wayland_pointer.h [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/ozone/platform/wayland/wayland_util.cc [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/ozone/platform/wayland/wayland_util.h [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/ozone/platform/wayland/wayland_window.cc [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/ozone/platform/wayland/wayland_window.h [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/ozone/platform/wayland/wayland_window_unittest.cc [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/ozone/platform/wayland/xdg_surface_wrapper_v5.cc [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/ozone/platform/wayland/xdg_surface_wrapper_v6.cc [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/platform_window/DEPS [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/platform_window/platform_window.h [add] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/platform_window/platform_window_handler/BUILD.gn [add] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/platform_window/platform_window_handler/DEPS [add] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/platform_window/platform_window_handler/wm_move_resize_handler.cc [add] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/platform_window/platform_window_handler/wm_move_resize_handler.h [add] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/platform_window/platform_window_handler/wm_platform_export.h [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/views/BUILD.gn [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.h [add] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/views/widget/desktop_aura/desktop_window_tree_host_platform_interactive_uitest.cc [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/views/widget/desktop_aura/window_event_filter.cc [modify] https://crrev.com/190d7012912f8d28c676ae534b18df3d33edab86/ui/views/widget/desktop_aura/window_event_filter.h
Comment 1 by msi...@igalia.com
, Jun 20 2018Labels: Wayland Proj-Ozone