| 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/browser/gtk/browser_window_gtk.h" | 5 #include "chrome/browser/gtk/browser_window_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
| 8 #include <X11/XF86keysym.h> | 8 #include <X11/XF86keysym.h> |
| 9 | 9 |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 #endif | 385 #endif |
| 386 frame_cursor_(NULL), | 386 frame_cursor_(NULL), |
| 387 is_active_(true) { | 387 is_active_(true) { |
| 388 use_custom_frame_.Init(prefs::kUseCustomChromeFrame, | 388 use_custom_frame_.Init(prefs::kUseCustomChromeFrame, |
| 389 browser_->profile()->GetPrefs(), this); | 389 browser_->profile()->GetPrefs(), this); |
| 390 window_ = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL)); | 390 window_ = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL)); |
| 391 g_object_set_data(G_OBJECT(window_), kBrowserWindowKey, this); | 391 g_object_set_data(G_OBJECT(window_), kBrowserWindowKey, this); |
| 392 gtk_widget_add_events(GTK_WIDGET(window_), GDK_BUTTON_PRESS_MASK | | 392 gtk_widget_add_events(GTK_WIDGET(window_), GDK_BUTTON_PRESS_MASK | |
| 393 GDK_POINTER_MOTION_MASK); | 393 GDK_POINTER_MOTION_MASK); |
| 394 | 394 |
| 395 // Add this window to its own unique window group to allow for |
| 396 // window-to-parent modality. |
| 397 gtk_window_group_add_window(gtk_window_group_new(), window_); |
| 398 g_object_unref(gtk_window_get_group(window_)); |
| 399 |
| 395 gtk_util::SetWindowIcon(window_); | 400 gtk_util::SetWindowIcon(window_); |
| 396 SetBackgroundColor(); | 401 SetBackgroundColor(); |
| 397 SetGeometryHints(); | 402 SetGeometryHints(); |
| 398 ConnectHandlersToSignals(); | 403 ConnectHandlersToSignals(); |
| 399 ConnectAccelerators(); | 404 ConnectAccelerators(); |
| 400 bounds_ = GetInitialWindowBounds(window_); | 405 bounds_ = GetInitialWindowBounds(window_); |
| 401 | 406 |
| 402 InitWidgets(); | 407 InitWidgets(); |
| 403 HideUnsupportedWindowFeatures(); | 408 HideUnsupportedWindowFeatures(); |
| 404 | 409 |
| (...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1532 *edge = GDK_WINDOW_EDGE_NORTH_EAST; | 1537 *edge = GDK_WINDOW_EDGE_NORTH_EAST; |
| 1533 } else if (y < bounds_.height() - kResizeAreaCornerSize) { | 1538 } else if (y < bounds_.height() - kResizeAreaCornerSize) { |
| 1534 *edge = GDK_WINDOW_EDGE_EAST; | 1539 *edge = GDK_WINDOW_EDGE_EAST; |
| 1535 } else { | 1540 } else { |
| 1536 *edge = GDK_WINDOW_EDGE_SOUTH_EAST; | 1541 *edge = GDK_WINDOW_EDGE_SOUTH_EAST; |
| 1537 } | 1542 } |
| 1538 return true; | 1543 return true; |
| 1539 } | 1544 } |
| 1540 NOTREACHED(); | 1545 NOTREACHED(); |
| 1541 } | 1546 } |
| OLD | NEW |