Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(654)

Side by Side Diff: chrome/common/gtk_util.cc

Issue 425016: Linux: Create app modal dialogs in a different way to work around a KDE 3 win... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: with missing files Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/gtk_util.h ('k') | chrome/common/platform_util_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/common/gtk_util.h ('k') | chrome/common/platform_util_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698