Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(713)

Unified Diff: ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc

Issue 196213004: Allows menu host windows to be enumerated in DragTargetWindowFinder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adds menus to the lsit of top level windows returned by EnumerateTopLevelWindows (including other p… Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc
diff --git a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc
index 3f48b8993b7e83b6f4a9ddd878f6a85951fbb4bb..9cd9fd4a3cf5c601c6ba8e0442e8fd4369e77269 100644
--- a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc
+++ b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc
@@ -31,6 +31,7 @@ namespace {
// The minimum alpha before we declare a pixel transparent when searching in
// our source image.
const uint32 kMinAlpha = 32;
+const unsigned char kDragWidgetOpacity = 0xc0;
class ScopedCapturer {
public:
@@ -76,6 +77,7 @@ uint32_t X11WholeScreenMoveLoop::Dispatch(const base::NativeEvent& event) {
gfx::Point location = gfx::ToFlooredPoint(
screen->GetCursorScreenPoint() - drag_offset_);
drag_widget_->SetBounds(gfx::Rect(location, drag_image_.size()));
+ drag_widget_->StackAtTop();
}
delegate_->OnMouseMovement(&xev->xmotion);
break;
@@ -267,6 +269,7 @@ void X11WholeScreenMoveLoop::CreateDragImageWindow() {
widget->set_focus_on_creation(false);
widget->set_frame_type(Widget::FRAME_TYPE_FORCE_NATIVE);
widget->Init(params);
+ widget->SetOpacity(kDragWidgetOpacity);
widget->GetNativeWindow()->SetName("DragWindow");
ImageView* image = new ImageView();
« ui/base/x/x11_util.h ('K') | « ui/views/widget/desktop_aura/x11_desktop_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698