OLD | NEW |
1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium OS 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 "window_manager/panel.h" | 5 #include "window_manager/panel.h" |
6 | 6 |
7 extern "C" { | 7 extern "C" { |
8 #include <X11/cursorfont.h> | 8 #include <X11/cursorfont.h> |
9 } | 9 } |
10 | 10 |
11 #include <gflags/gflags.h> | 11 #include <gflags/gflags.h> |
12 #include "chromeos/obsolete_logging.h" | 12 #include "chromeos/obsolete_logging.h" |
13 | 13 |
14 #include "window_manager/atom_cache.h" | 14 #include "window_manager/atom_cache.h" |
15 #include "window_manager/panel_bar.h" | 15 #include "window_manager/panel_bar.h" |
16 #include "window_manager/util.h" | 16 #include "window_manager/util.h" |
17 #include "window_manager/window.h" | 17 #include "window_manager/window.h" |
18 #include "window_manager/window_manager.h" | 18 #include "window_manager/window_manager.h" |
19 #include "window_manager/x_connection.h" | 19 #include "window_manager/x_connection.h" |
20 | 20 |
21 DEFINE_int32(panel_max_width, -1, | 21 DEFINE_int32(panel_max_width, -1, |
22 "Maximum width for panels (0 or less means unconstrained)"); | 22 "Maximum width for panels (0 or less means unconstrained)"); |
23 DEFINE_int32(panel_max_height, -1, | 23 DEFINE_int32(panel_max_height, -1, |
24 "Maximum height for panels (0 or less means unconstrained)"); | 24 "Maximum height for panels (0 or less means unconstrained)"); |
25 DEFINE_bool(panel_opaque_resize, false, "Resize panels opaquely"); | 25 DEFINE_bool(panel_opaque_resize, false, "Resize panels opaquely"); |
26 | 26 |
27 namespace chromeos { | 27 namespace window_manager { |
| 28 |
| 29 using chromeos::NewPermanentCallback; |
28 | 30 |
29 // Width of titlebars for collapsed panels. Expanded panels' titlebars are | 31 // Width of titlebars for collapsed panels. Expanded panels' titlebars are |
30 // resized to match the width of the panel contents. | 32 // resized to match the width of the panel contents. |
31 static const int kCollapsedTitlebarWidth = 200; | 33 static const int kCollapsedTitlebarWidth = 200; |
32 | 34 |
33 // Amount of time to take for animations. | 35 // Amount of time to take for animations. |
34 static const int kAnimMs = 150; | 36 static const int kAnimMs = 150; |
35 | 37 |
36 // Minimum dimensions to which a panel's contents can be resized. | 38 // Minimum dimensions to which a panel's contents can be resized. |
37 static const int kPanelMinWidth = 20; | 39 static const int kPanelMinWidth = 20; |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 } else { | 528 } else { |
527 // Move the windows offscreen if the panel is collapsed. | 529 // Move the windows offscreen if the panel is collapsed. |
528 wm()->xconn()->ConfigureWindowOffscreen(top_input_xid_); | 530 wm()->xconn()->ConfigureWindowOffscreen(top_input_xid_); |
529 wm()->xconn()->ConfigureWindowOffscreen(top_left_input_xid_); | 531 wm()->xconn()->ConfigureWindowOffscreen(top_left_input_xid_); |
530 wm()->xconn()->ConfigureWindowOffscreen(top_right_input_xid_); | 532 wm()->xconn()->ConfigureWindowOffscreen(top_right_input_xid_); |
531 wm()->xconn()->ConfigureWindowOffscreen(left_input_xid_); | 533 wm()->xconn()->ConfigureWindowOffscreen(left_input_xid_); |
532 wm()->xconn()->ConfigureWindowOffscreen(right_input_xid_); | 534 wm()->xconn()->ConfigureWindowOffscreen(right_input_xid_); |
533 } | 535 } |
534 } | 536 } |
535 | 537 |
536 } // namespace chromeos | 538 } // namespace window_manager |
OLD | NEW |