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 "views/widget/native_widget_gtk.h" | 5 #include "views/widget/native_widget_gtk.h" |
6 | 6 |
7 #include <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
8 #include <gdk/gdkx.h> | 8 #include <gdk/gdkx.h> |
9 #include <X11/extensions/shape.h> | 9 #include <X11/extensions/shape.h> |
10 #include <X11/Xatom.h> | 10 #include <X11/Xatom.h> |
(...skipping 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1625 | 1625 |
1626 void NativeWidgetGtk::OnShow(GtkWidget* widget) { | 1626 void NativeWidgetGtk::OnShow(GtkWidget* widget) { |
1627 } | 1627 } |
1628 | 1628 |
1629 void NativeWidgetGtk::OnMap(GtkWidget* widget) { | 1629 void NativeWidgetGtk::OnMap(GtkWidget* widget) { |
1630 #if defined(TOUCH_UI) | 1630 #if defined(TOUCH_UI) |
1631 // Force an expose event to trigger OnPaint for touch. This is | 1631 // Force an expose event to trigger OnPaint for touch. This is |
1632 // a workaround for a bug that X Expose event does not trigger | 1632 // a workaround for a bug that X Expose event does not trigger |
1633 // Gdk's expose signal. This happens when you try to open views menu | 1633 // Gdk's expose signal. This happens when you try to open views menu |
1634 // while a virtual keyboard gets kicked in or out. This seems to be | 1634 // while a virtual keyboard gets kicked in or out. This seems to be |
1635 // a bug in message_pump_glib_x.cc as we do get X Expose event but | 1635 // a bug in message_pump_x.cc as we do get X Expose event but |
1636 // it doesn't trigger gtk's expose signal. We're not going to fix this | 1636 // it doesn't trigger gtk's expose signal. We're not going to fix this |
1637 // as we're removing gtk and migrating to new compositor. | 1637 // as we're removing gtk and migrating to new compositor. |
1638 gdk_window_process_all_updates(); | 1638 gdk_window_process_all_updates(); |
1639 #endif | 1639 #endif |
1640 } | 1640 } |
1641 | 1641 |
1642 void NativeWidgetGtk::OnHide(GtkWidget* widget) { | 1642 void NativeWidgetGtk::OnHide(GtkWidget* widget) { |
1643 } | 1643 } |
1644 | 1644 |
1645 gboolean NativeWidgetGtk::OnWindowStateEvent(GtkWidget* widget, | 1645 gboolean NativeWidgetGtk::OnWindowStateEvent(GtkWidget* widget, |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2100 | 2100 |
2101 // And now, notify them that they have a brand new parent. | 2101 // And now, notify them that they have a brand new parent. |
2102 for (Widget::Widgets::iterator it = widgets.begin(); | 2102 for (Widget::Widgets::iterator it = widgets.begin(); |
2103 it != widgets.end(); ++it) { | 2103 it != widgets.end(); ++it) { |
2104 (*it)->NotifyNativeViewHierarchyChanged(true, new_parent); | 2104 (*it)->NotifyNativeViewHierarchyChanged(true, new_parent); |
2105 } | 2105 } |
2106 } | 2106 } |
2107 | 2107 |
2108 } // namespace internal | 2108 } // namespace internal |
2109 } // namespace views | 2109 } // namespace views |
OLD | NEW |