| 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 "ui/views/widget/native_widget_gtk.h" | 5 #include "ui/views/widget/native_widget_gtk.h" |
| 6 | 6 |
| 7 #include <X11/Xatom.h> | 7 #include <X11/Xatom.h> |
| 8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
| 9 #include <X11/extensions/shape.h> | 9 #include <X11/extensions/shape.h> |
| 10 #include <gdk/gdk.h> | 10 #include <gdk/gdk.h> |
| (...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1336 return; | 1336 return; |
| 1337 } | 1337 } |
| 1338 gtk_window_set_focus(GTK_WINDOW(GetNativeView()), NULL); | 1338 gtk_window_set_focus(GTK_WINDOW(GetNativeView()), NULL); |
| 1339 } | 1339 } |
| 1340 | 1340 |
| 1341 void NativeWidgetGtk::FocusNativeView(gfx::NativeView native_view) { | 1341 void NativeWidgetGtk::FocusNativeView(gfx::NativeView native_view) { |
| 1342 if (native_view && !gtk_widget_is_focus(native_view)) | 1342 if (native_view && !gtk_widget_is_focus(native_view)) |
| 1343 gtk_widget_grab_focus(native_view); | 1343 gtk_widget_grab_focus(native_view); |
| 1344 } | 1344 } |
| 1345 | 1345 |
| 1346 bool NativeWidgetGtk::ConvertPointFromAncestor( | |
| 1347 const Widget* ancestor, gfx::Point* point) const { | |
| 1348 NOTREACHED(); | |
| 1349 return false; | |
| 1350 } | |
| 1351 | |
| 1352 gfx::Rect NativeWidgetGtk::GetWorkAreaBoundsInScreen() const { | 1346 gfx::Rect NativeWidgetGtk::GetWorkAreaBoundsInScreen() const { |
| 1353 return gfx::Screen::GetMonitorWorkAreaNearestWindow(GetNativeView()); | 1347 return gfx::Screen::GetMonitorWorkAreaNearestWindow(GetNativeView()); |
| 1354 } | 1348 } |
| 1355 | 1349 |
| 1356 void NativeWidgetGtk::SetInactiveRenderingDisabled(bool value) { | 1350 void NativeWidgetGtk::SetInactiveRenderingDisabled(bool value) { |
| 1357 } | 1351 } |
| 1358 | 1352 |
| 1359 //////////////////////////////////////////////////////////////////////////////// | 1353 //////////////////////////////////////////////////////////////////////////////// |
| 1360 // NativeWidgetGtk, protected: | 1354 // NativeWidgetGtk, protected: |
| 1361 | 1355 |
| (...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2299 button_pressed = event->type == GDK_BUTTON_PRESS || | 2293 button_pressed = event->type == GDK_BUTTON_PRESS || |
| 2300 event->type == GDK_2BUTTON_PRESS || | 2294 event->type == GDK_2BUTTON_PRESS || |
| 2301 event->type == GDK_3BUTTON_PRESS; | 2295 event->type == GDK_3BUTTON_PRESS; |
| 2302 gdk_event_free(event); | 2296 gdk_event_free(event); |
| 2303 } | 2297 } |
| 2304 return button_pressed; | 2298 return button_pressed; |
| 2305 } | 2299 } |
| 2306 | 2300 |
| 2307 } // namespace internal | 2301 } // namespace internal |
| 2308 } // namespace views | 2302 } // namespace views |
| OLD | NEW |