New issue
Advanced search Search tips

Issue 854564 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 3
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 890282

Blocking:
issue 578890



Sign in to add a comment

[ozone/wayland] Ozone/Wayland: fix move/resize actions.

Project Member Reported by msi...@igalia.com, Jun 20 2018

Issue description

Currently, this feature does not work in ozone/wayland. Fix it!
 

Comment 1 by msi...@igalia.com, Jun 20 2018

Blocking: 578890
Labels: Wayland Proj-Ozone

Comment 2 by msi...@igalia.com, Jun 20 2018

Status: Started (was: Untriaged)
Cc: sadrul@chromium.org sky@chromium.org
Summary: [ozone/wayland] Ozone/Wayland: fix move/resize actions. (was: Ozone/Wayland: fix move/resize actions.)
Here is cl https://chromium-review.googlesource.com/c/chromium/src/+/1078248.

Adding more people to gain more attention to it.
Components: UI
Blockedon: 890282
Project Member

Comment 6 by bugdroid1@chromium.org, Oct 3

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

Status: Fixed (was: Started)

Sign in to add a comment