OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/chromeos/frame/panel_controller.h" | 5 #include "chrome/browser/chromeos/frame/panel_controller.h" |
6 | 6 |
7 #if defined(TOUCH_UI) | 7 #if defined(TOUCH_UI) |
8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
9 #include <X11/extensions/XInput2.h> | 9 #include <X11/extensions/XInput2.h> |
10 #endif | 10 #endif |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 // titlebar window. See WM_IPC_MESSAGE_WM_NOTIFY_PANEL_DRAGGED's declaration | 260 // titlebar window. See WM_IPC_MESSAGE_WM_NOTIFY_PANEL_DRAGGED's declaration |
261 // for details. | 261 // for details. |
262 gint title_width = 1; | 262 gint title_width = 1; |
263 gtk_window_get_size(GTK_WINDOW(title_), &title_width, NULL); | 263 gtk_window_get_size(GTK_WINDOW(title_), &title_width, NULL); |
264 | 264 |
265 mouse_down_ = true; | 265 mouse_down_ = true; |
266 mouse_down_offset_x_ = event.x() - title_width; | 266 mouse_down_offset_x_ = event.x() - title_width; |
267 mouse_down_offset_y_ = event.y(); | 267 mouse_down_offset_y_ = event.y(); |
268 dragging_ = false; | 268 dragging_ = false; |
269 | 269 |
270 #if !defined(TOUCH_UI) && !defined(USE_AURA) | 270 #if defined(TOOLKIT_USES_GTK) |
271 const GdkEvent* gdk_event = event.gdk_event(); | 271 const GdkEvent* gdk_event = event.gdk_event(); |
272 GdkEventButton last_button_event = gdk_event->button; | 272 GdkEventButton last_button_event = gdk_event->button; |
273 mouse_down_abs_x_ = last_button_event.x_root; | 273 mouse_down_abs_x_ = last_button_event.x_root; |
274 mouse_down_abs_y_ = last_button_event.y_root; | 274 mouse_down_abs_y_ = last_button_event.y_root; |
275 #else | 275 #else |
276 const XEvent* xev = event.native_event(); | 276 const XEvent* xev = event.native_event(); |
277 gfx::Point abs_location = RootLocationFromXEvent(xev); | 277 gfx::Point abs_location = RootLocationFromXEvent(xev); |
278 mouse_down_abs_x_ = abs_location.x(); | 278 mouse_down_abs_x_ = abs_location.x(); |
279 mouse_down_abs_y_ = abs_location.y(); | 279 mouse_down_abs_y_ = abs_location.y(); |
280 #endif | 280 #endif |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 views::Button* sender, const views::Event& event) { | 524 views::Button* sender, const views::Event& event) { |
525 if (panel_controller_ && sender == close_button_) | 525 if (panel_controller_ && sender == close_button_) |
526 panel_controller_->OnCloseButtonPressed(); | 526 panel_controller_->OnCloseButtonPressed(); |
527 } | 527 } |
528 | 528 |
529 PanelController::TitleContentView::~TitleContentView() { | 529 PanelController::TitleContentView::~TitleContentView() { |
530 VLOG(1) << "panel: delete " << this; | 530 VLOG(1) << "panel: delete " << this; |
531 } | 531 } |
532 | 532 |
533 } // namespace chromeos | 533 } // namespace chromeos |
OLD | NEW |