diff options
| author | Marco Trevisan (TreviƱo) <mail@3v1n0.net> | 2014-11-28 12:55:13 +0000 |
|---|---|---|
| committer | CI bot <ps-jenkins@lists.canonical.com> | 2014-11-28 12:55:13 +0000 |
| commit | 71f95bf7e572817600b8056e1850db2aeb048ab8 (patch) | |
| tree | ad76382e9518309ec78b1945eba927b45ab885af /unity-shared | |
| parent | 494317fca73620f4e2caad0dc7cfdbc447c2703a (diff) | |
| parent | 4aeb701011ec29e0be49f90244b9f3cdeb9f1478 (diff) | |
DecoratedWindow: make sure we always set a _NET_FRAME_EXTENTS for windows that requested it
Correctly handle the _NET_REQUEST_FRAME_EXTENTS message, by always replying to the window setting the guessed _NET_FRAME_EXTENTS property. Fixes: #1383429 Approved by: Andrea Azzarone, PS Jenkins bot (bzr r3887)
Diffstat (limited to 'unity-shared')
| -rw-r--r-- | unity-shared/CompizUtils.cpp | 6 | ||||
| -rw-r--r-- | unity-shared/CompizUtils.h | 16 |
2 files changed, 17 insertions, 5 deletions
diff --git a/unity-shared/CompizUtils.cpp b/unity-shared/CompizUtils.cpp index 94322a68f..406343014 100644 --- a/unity-shared/CompizUtils.cpp +++ b/unity-shared/CompizUtils.cpp @@ -177,14 +177,14 @@ int CairoContext::height() const // // -unsigned WindowDecorationElements(CompWindow* win) +unsigned WindowDecorationElements(CompWindow* win, WindowFilter::Value wf) { unsigned elements = DecorationElement::NONE; if (!win) return elements; - if (!win->isViewable()) + if (!win->isViewable() && wf == WindowFilter::NONE) return elements; if (win->wmType() & (CompWindowTypeDockMask | CompWindowTypeDesktopMask)) @@ -208,7 +208,7 @@ unsigned WindowDecorationElements(CompWindow* win) if (!win->overrideRedirect() && (win->type() & DECORABLE_WINDOW_TYPES) && - (win->frame() || win->hasUnmapReference())) + (win->frame() || win->hasUnmapReference() || wf == WindowFilter::UNMAPPED)) { if (win->actions() & CompWindowActionResizeMask) elements |= DecorationElement::EDGE; diff --git a/unity-shared/CompizUtils.h b/unity-shared/CompizUtils.h index f1885a5cc..8129ab2b7 100644 --- a/unity-shared/CompizUtils.h +++ b/unity-shared/CompizUtils.h @@ -119,7 +119,18 @@ private: cairo_t *cr_; }; -enum DecorationElement +namespace WindowFilter +{ +enum Value +{ + NONE, + UNMAPPED +}; +} + +namespace DecorationElement +{ +enum { NONE = 0, EDGE = (1 << 0), @@ -127,8 +138,9 @@ enum DecorationElement BORDER = (1 << 2), FULL = EDGE|SHADOW|BORDER }; +} -unsigned WindowDecorationElements(CompWindow*); +unsigned WindowDecorationElements(CompWindow*, WindowFilter::Value wf = WindowFilter::NONE); bool IsWindowEdgeDecorable(CompWindow*); bool IsWindowShadowDecorable(CompWindow*); |
