| 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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 DCHECK(GTK_WIDGET_REALIZED(toplevel)); | 576 DCHECK(GTK_WIDGET_REALIZED(toplevel)); |
| 577 | 577 |
| 578 gint x = 0, y = 0; | 578 gint x = 0, y = 0; |
| 579 gtk_widget_translate_coordinates(widget, | 579 gtk_widget_translate_coordinates(widget, |
| 580 toplevel, | 580 toplevel, |
| 581 0, 0, | 581 0, 0, |
| 582 &x, &y); | 582 &x, &y); |
| 583 return gfx::Rect(x, y, widget->allocation.width, widget->allocation.height); | 583 return gfx::Rect(x, y, widget->allocation.width, widget->allocation.height); |
| 584 } | 584 } |
| 585 | 585 |
| 586 void ApplyMessageDialogQuirks(GtkWidget* dialog) { |
| 587 if (gtk_window_get_modal(GTK_WINDOW(dialog))) { |
| 588 // Work around a KDE 3 window manager bug. |
| 589 scoped_ptr<base::EnvironmentVariableGetter> env( |
| 590 base::EnvironmentVariableGetter::Create()); |
| 591 if (base::DESKTOP_ENVIRONMENT_KDE3 == GetDesktopEnvironment(env.get())) |
| 592 gtk_window_set_skip_taskbar_hint(GTK_WINDOW(dialog), FALSE); |
| 593 } |
| 594 } |
| 595 |
| 586 } // namespace gtk_util | 596 } // namespace gtk_util |
| OLD | NEW |