Skip to content

Commit

Permalink
Add inital support for a tab drag window.
Browse files Browse the repository at this point in the history
This patch adds an initial support to start a move loop and create
a new window by dragging a tab. To start with, this commit
extends WindowTree::PerformWindowMove, which calls
WindowServer::StartMoveLoop -> PlatformWindow::RunMoveLoop.

X11 Ozone implementation of PlatformWindow uses
WindowMoveLoopClient, which instantiates the move loop and
WholeScreenMoveLoop, which creates an invisible window
and intercepts all the events from it. Then the system screen
location is taken and sent to WindowMoveLoopClient, which
updates actual bounds of X11WindowBase.

The way it works is precisly the same as in stock X11, but
further work to share the code is needed, because there are
some difference between stock x11 and ozone x11 event
handlings, bounds set and etc.

Issue #264

fixup! [ozone/wayland] Add inital support for a tab drag window.

adapt to
https://crrev.com/c/774778

CanDispatchEvent is modified in such a way that it also tests if
the client in a move loop right now. If so, it must dispatch events
further once whole_screen_move_loop processes them in order to update
mouse locations on aura side.

fixup! [ozone/wayland] Add inital support for a tab drag window.

It removed changes at services from previous change to make it
available without mus and made WindowFinder with ozone work without
mus with creating GetLocalProcessWindowAtPointOzone to
get gfx::NativeWindow at input position.

Issue #430

fixup! Add inital support for a tab drag window.

Remove the non-existing code and fix ozone/drm build.

Change-Id: I9d3a94a9e47ed2bddaef0253de193d92e01768b0

fixup! Add inital support for a tab drag window.

Change-Id: I9ec57fafe8210d334e2f63744930d23ed26d4f98

fixup! Implements Drag and Drop for Ozone/X11

Change-Id: Idb61d4a2bd7500ff1f878169a341313211b55cde

fixup! Add inital support for a tab drag window.

Change-Id: I1f03f40bde5196d8d5fe06413d56a69f00616eb1

fixup! Add inital support for a tab drag window.

Change-Id: I0357563124045e9ac1e3b308a721e56616e3c5e7

fixup! Add inital support for a tab drag window.

Change-Id: Ifd909c6b3df7105f61d8bf5b8150d366957080ce

fixup! Add inital support for a tab drag window.

Change-Id: I61f92a7e10d138373f70a37415e05155ee59c3c3

fixup! Add inital support for a tab drag window.

Change-Id: Ia946520685cfb0b1d8b5dfebc70b257915e1e56c

fixup! Add inital support for a tab drag window.

Add missing dep.

Change-Id: I6bed67794fb50ac86d66c49b57161021f1fed54f

fixup! Add inital support for a tab drag window.

Change-Id: Ic7e4eabc06e892610f4f9893b0851f82f7149569

fixup! Add inital support for a tab drag window.

Change-Id: Ib641f17106d101580e356caa3f83833bc08e4e1d
  • Loading branch information
jkim-julie authored and msisov committed Feb 25, 2019
1 parent a45ea77 commit 0708123
Show file tree
Hide file tree
Showing 19 changed files with 2,081 additions and 544 deletions.
43 changes: 30 additions & 13 deletions ui/base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,12 @@ jumbo_component("base") {
deps += [ "//ui/events" ]
}

if (use_x11 || ozone_platform_x11) {
configs += [ "//build/config/linux:x11" ]
}

if (use_x11) {
public_deps += [ "//ui/base/x" ]
configs += [ "//build/config/linux:x11" ]

if (!is_chromeos) {
sources += [
Expand All @@ -446,30 +449,44 @@ jumbo_component("base") {
}
}

if (use_x11 && use_aura) {
if ((use_x11 || ozone_platform_x11) && use_aura) {
sources += [
"cursor/cursor_loader_x11.cc",
"cursor/cursor_loader_x11.h",
"cursor/cursor_x11.cc",
"x/selection_owner.cc",
"x/selection_owner.h",
"x/selection_requestor.cc",
"x/selection_requestor.h",
"x/selection_utils.cc",
"x/selection_utils.h",
]
deps += [
"//ui/events/platform/x11",
"//ui/gfx/x",
]

if (!is_chromeos) {
# These Aura X11 files aren't used on ChromeOS.
sources += [
"dragdrop/os_exchange_data_provider_aurax11.cc",
"dragdrop/os_exchange_data_provider_aurax11.h",
"dragdrop/os_exchange_data_provider_aurax11_base.cc",
"dragdrop/os_exchange_data_provider_aurax11_base.h",
]
}

if (use_x11 && use_aura) {
sources += [
"cursor/cursor_loader_x11.cc",
"cursor/cursor_loader_x11.h",
"cursor/cursor_x11.cc",
"x/selection_requestor.cc",
"x/selection_requestor.h",
]

if (!is_chromeos) {
# These Aura X11 files aren't used on ChromeOS.
sources += [
"dragdrop/os_exchange_data_provider_aurax11.cc",
"dragdrop/os_exchange_data_provider_aurax11.h",
]
}
}

deps += [
"//ui/events/platform/x11",
"//ui/gfx/x",
]
}

if (use_aura) {
Expand Down
Loading

0 comments on commit 0708123

Please sign in to comment.