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

Side by Side Diff: chrome/browser/ui/gtk/browser_window_gtk.cc

Issue 10388217: Users stuck in fullscreen mode when running gnome-shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move outside of TOOLKIT_GTK Created 8 years, 7 months 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 | « no previous file | ui/base/x/x11_util.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/ui/gtk/browser_window_gtk.h" 5 #include "chrome/browser/ui/gtk/browser_window_gtk.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <gdk/gdkkeysyms.h> 8 #include <gdk/gdkkeysyms.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 gtk_window_set_role(window_, "browser"); 421 gtk_window_set_role(window_, "browser");
422 SetGeometryHints(); 422 SetGeometryHints();
423 InitWidgets(); 423 InitWidgets();
424 } 424 }
425 425
426 ConnectAccelerators(); 426 ConnectAccelerators();
427 427
428 // Set the initial background color of widgets. 428 // Set the initial background color of widgets.
429 SetBackgroundColor(); 429 SetBackgroundColor();
430 HideUnsupportedWindowFeatures(); 430 HideUnsupportedWindowFeatures();
431
432 // Setting _GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED tells gnome-shell to not force
433 // fullscreen on the window when it matches the desktop size.
434 ui::SetHideTitlebarWhenMaximizedProperty(
435 ui::GetX11WindowFromGtkWidget(GTK_WIDGET(window_)));
431 } 436 }
432 437
433 gboolean BrowserWindowGtk::OnCustomFrameExpose(GtkWidget* widget, 438 gboolean BrowserWindowGtk::OnCustomFrameExpose(GtkWidget* widget,
434 GdkEventExpose* event) { 439 GdkEventExpose* event) {
435 TRACE_EVENT0("ui::gtk", "BrowserWindowGtk::OnCustomFrameExpose"); 440 TRACE_EVENT0("ui::gtk", "BrowserWindowGtk::OnCustomFrameExpose");
436 441
437 // Draw the default background. 442 // Draw the default background.
438 cairo_t* cr = gdk_cairo_create(gtk_widget_get_window(widget)); 443 cairo_t* cr = gdk_cairo_create(gtk_widget_get_window(widget));
439 gdk_cairo_rectangle(cr, &event->area); 444 gdk_cairo_rectangle(cr, &event->area);
440 cairo_clip(cr); 445 cairo_clip(cr);
(...skipping 2145 matching lines...) Expand 10 before | Expand all | Expand 10 after
2586 wm_type == ui::WM_OPENBOX || 2591 wm_type == ui::WM_OPENBOX ||
2587 wm_type == ui::WM_XFWM4); 2592 wm_type == ui::WM_XFWM4);
2588 } 2593 }
2589 2594
2590 // static 2595 // static
2591 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { 2596 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
2592 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); 2597 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser);
2593 browser_window_gtk->Init(); 2598 browser_window_gtk->Init();
2594 return browser_window_gtk; 2599 return browser_window_gtk;
2595 } 2600 }
OLDNEW
« no previous file with comments | « no previous file | ui/base/x/x11_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698