diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2016-03-09 18:28:36 +0100 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2016-03-09 18:28:36 +0100 |
| commit | 9559b59b73baea406d0d883fe5a20f97df1192bf (patch) | |
| tree | e949c55b672cbd5940019caef34611bbc68460a4 /plugins | |
| parent | dff5930335a8ef8d73bfe7d25b9bb2d9101d5453 (diff) | |
UnityScreen: handle adding/removing supported atoms at this level
(bzr r3983.15.9)
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/unityshell/src/unityshell.cpp | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp index f2dada7bf..265ed89bc 100644 --- a/plugins/unityshell/src/unityshell.cpp +++ b/plugins/unityshell/src/unityshell.cpp @@ -175,6 +175,12 @@ const std::string HUD_UNGRAB_WAIT = "hud-ungrab-wait"; const std::string FIRST_RUN_STAMP = "first_run.stamp"; const std::string LOCKED_STAMP = "locked.stamp"; } // namespace local + +namespace atom +{ +Atom _UNITY_SAVED_WINDOW_SHAPE = 0; +} + } // anon namespace UnityScreen::UnityScreen(CompScreen* screen) @@ -311,6 +317,8 @@ UnityScreen::UnityScreen(CompScreen* screen) CompositeScreenInterface::setHandler(cScreen); GLScreenInterface::setHandler(gScreen); ScaleScreenInterface::setHandler(sScreen); + + atom::_UNITY_SAVED_WINDOW_SHAPE = XInternAtom(screen->dpy(), "_UNITY_SAVED_WINDOW_SHAPE", False); screen->updateSupportedWmHints(); nux::NuxInitialize(0); @@ -504,8 +512,10 @@ UnityScreen::~UnityScreen() QuicklistManager::Destroy(); decoration::DataPool::Reset(); SaveLockStamp(false); - reset_glib_logging(); + + screen->addSupportedAtomsSetEnabled(this, false); + screen->updateSupportedWmHints(); } void UnityScreen::InitAltTabNextWindow() @@ -1768,6 +1778,7 @@ void UnityScreen::determineNuxDamage(CompRegion& nux_damage) void UnityScreen::addSupportedAtoms(std::vector<Atom>& atoms) { screen->addSupportedAtoms(atoms); + atoms.push_back(atom::_UNITY_SAVED_WINDOW_SHAPE); deco_manager_->AddSupportedAtoms(atoms); } @@ -4180,13 +4191,17 @@ bool WindowHasInconsistentShapeRects(Display *d, Window w) int n; Atom *atoms = XListProperties(d, w, &n); bool has_inconsistent_shape = false; - static Atom unity_shape_rects_atom = XInternAtom(d, "_UNITY_SAVED_WINDOW_SHAPE", False); for (int i = 0; i < n; ++i) - if (atoms[i] == unity_shape_rects_atom) + { + if (atoms[i] == atom::_UNITY_SAVED_WINDOW_SHAPE) + { has_inconsistent_shape = true; + break; + } + } - XFree (atoms); + XFree(atoms); return has_inconsistent_shape; } } |
