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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc

Issue 2347383002: X11: Use better visuals for OpenGL (Closed)
Patch Set: auto* Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h" 5 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h"
6 6
7 #include <X11/Xatom.h> 7 #include <X11/Xatom.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 xev.xclient.data.l[2] = CurrentTime; 1178 xev.xclient.data.l[2] = CurrentTime;
1179 xev.xclient.data.l[3] = None; 1179 xev.xclient.data.l[3] = None;
1180 xev.xclient.data.l[4] = None; 1180 xev.xclient.data.l[4] = None;
1181 SendXClientEvent(dest_window, &xev); 1181 SendXClientEvent(dest_window, &xev);
1182 } 1182 }
1183 1183
1184 void DesktopDragDropClientAuraX11::CreateDragWidget( 1184 void DesktopDragDropClientAuraX11::CreateDragWidget(
1185 const gfx::ImageSkia& image) { 1185 const gfx::ImageSkia& image) {
1186 Widget* widget = new Widget; 1186 Widget* widget = new Widget;
1187 Widget::InitParams params(Widget::InitParams::TYPE_DRAG); 1187 Widget::InitParams params(Widget::InitParams::TYPE_DRAG);
1188 params.opacity = Widget::InitParams::OPAQUE_WINDOW; 1188 params.opacity = Widget::InitParams::TRANSLUCENT_WINDOW;
1189 params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 1189 params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
1190 params.accept_events = false; 1190 params.accept_events = false;
1191 1191
1192 gfx::Point location = display::Screen::GetScreen()->GetCursorScreenPoint() - 1192 gfx::Point location = display::Screen::GetScreen()->GetCursorScreenPoint() -
1193 drag_widget_offset_; 1193 drag_widget_offset_;
1194 params.bounds = gfx::Rect(location, image.size()); 1194 params.bounds = gfx::Rect(location, image.size());
1195 widget->set_focus_on_creation(false); 1195 widget->set_focus_on_creation(false);
1196 widget->set_frame_type(Widget::FRAME_TYPE_FORCE_NATIVE); 1196 widget->set_frame_type(Widget::FRAME_TYPE_FORCE_NATIVE);
1197 widget->Init(params); 1197 widget->Init(params);
1198 widget->SetOpacity(kDragWidgetOpacity); 1198 widget->SetOpacity(kDragWidgetOpacity);
(...skipping 26 matching lines...) Expand all
1225 for (int x = 0; x < in_bitmap->width(); ++x) { 1225 for (int x = 0; x < in_bitmap->width(); ++x) {
1226 if (SkColorGetA(in_row[x]) > kMinAlpha) 1226 if (SkColorGetA(in_row[x]) > kMinAlpha)
1227 return true; 1227 return true;
1228 } 1228 }
1229 } 1229 }
1230 1230
1231 return false; 1231 return false;
1232 } 1232 }
1233 1233
1234 } // namespace views 1234 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/test/views_test_base.cc ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698