| 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/window.h" | 5 #include "window_manager/window.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include <gflags/gflags.h> | 9 #include <gflags/gflags.h> |
| 10 | 10 |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 13 #include "chromeos/obsolete_logging.h" | 13 #include "chromeos/obsolete_logging.h" |
| 14 | 14 |
| 15 #include "window_manager/atom_cache.h" | 15 #include "window_manager/atom_cache.h" |
| 16 #include "window_manager/shadow.h" | 16 #include "window_manager/shadow.h" |
| 17 #include "window_manager/util.h" | 17 #include "window_manager/util.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_bool(window_drop_shadows, true, "Display drop shadows under windows"); | 21 DEFINE_bool(window_drop_shadows, true, "Display drop shadows under windows"); |
| 22 | 22 |
| 23 DECLARE_bool(wm_use_compositing); // from window_manager.cc | 23 DECLARE_bool(wm_use_compositing); // from window_manager.cc |
| 24 | 24 |
| 25 namespace chromeos { | 25 namespace window_manager { |
| 26 | 26 |
| 27 Window::Window(WindowManager* wm, XWindow xid) | 27 Window::Window(WindowManager* wm, XWindow xid) |
| 28 : xid_(xid), | 28 : xid_(xid), |
| 29 xid_str_(XidStr(xid_)), | 29 xid_str_(XidStr(xid_)), |
| 30 wm_(wm), | 30 wm_(wm), |
| 31 actor_(wm_->clutter()->CreateTexturePixmap()), | 31 actor_(wm_->clutter()->CreateTexturePixmap()), |
| 32 shadow_(FLAGS_window_drop_shadows ? new Shadow(wm->clutter()) : NULL), | 32 shadow_(FLAGS_window_drop_shadows ? new Shadow(wm->clutter()) : NULL), |
| 33 transient_for_xid_(None), | 33 transient_for_xid_(None), |
| 34 override_redirect_(false), | 34 override_redirect_(false), |
| 35 mapped_(false), | 35 mapped_(false), |
| (...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 | 781 |
| 782 XAtom state_xatom = wm_->GetXAtom(ATOM_CHROME_STATE); | 782 XAtom state_xatom = wm_->GetXAtom(ATOM_CHROME_STATE); |
| 783 if (!values.empty()) { | 783 if (!values.empty()) { |
| 784 return wm_->xconn()->SetIntArrayProperty( | 784 return wm_->xconn()->SetIntArrayProperty( |
| 785 xid_, state_xatom, XA_ATOM, values); | 785 xid_, state_xatom, XA_ATOM, values); |
| 786 } else { | 786 } else { |
| 787 return wm_->xconn()->DeletePropertyIfExists(xid_, state_xatom); | 787 return wm_->xconn()->DeletePropertyIfExists(xid_, state_xatom); |
| 788 } | 788 } |
| 789 } | 789 } |
| 790 | 790 |
| 791 } // namespace chromeos | 791 } // namespace window_manager |
| OLD | NEW |