| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/common/gtk_util.h" | 5 #include "chrome/common/gtk_util.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 #include <gdk/gdkx.h> | 8 #include <gdk/gdkx.h> |
| 9 | 9 |
| 10 #include <cstdarg> | 10 #include <cstdarg> |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 } else { | 561 } else { |
| 562 // The window manager shouldn't reparent override-redirect windows. | 562 // The window manager shouldn't reparent override-redirect windows. |
| 563 DLOG(ERROR) << "override-redirect window " << window_xid | 563 DLOG(ERROR) << "override-redirect window " << window_xid |
| 564 << "'s parent is " << window_parent | 564 << "'s parent is " << window_parent |
| 565 << ", rather than root window " | 565 << ", rather than root window " |
| 566 << x11_util::GetX11RootWindow(); | 566 << x11_util::GetX11RootWindow(); |
| 567 } | 567 } |
| 568 } | 568 } |
| 569 } | 569 } |
| 570 | 570 |
| 571 gfx::Rect GetWidgetRectRelativeToToplevel(GtkWidget* widget) { |
| 572 gint x = 0, y = 0; |
| 573 DCHECK(gtk_widget_translate_coordinates(widget, |
| 574 gtk_widget_get_toplevel(widget), |
| 575 0, 0, |
| 576 &x, &y)); |
| 577 return gfx::Rect(x, y, widget->allocation.width, widget->allocation.height); |
| 578 } |
| 579 |
| 571 } // namespace gtk_util | 580 } // namespace gtk_util |
| OLD | NEW |