summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/decor/src/decor.cpp24
-rw-r--r--plugins/resize/src/resize.cpp6
-rw-r--r--plugins/scale/src/scale.cpp8
3 files changed, 24 insertions, 14 deletions
diff --git a/plugins/decor/src/decor.cpp b/plugins/decor/src/decor.cpp
index 1c5b2cd..0070271 100644
--- a/plugins/decor/src/decor.cpp
+++ b/plugins/decor/src/decor.cpp
@@ -647,7 +647,14 @@ DecorWindow::shiftY ()
static bool
decorOffsetMove (CompWindow *w, XWindowChanges xwc, unsigned int mask)
{
+ CompOption::Vector o;
+ o.resize (1);
+
+ o.at (0).setName ("window", CompOption::TypeInt);
+ o.at (0).value ().set ((int) w->id ());
+
w->configureXWindow (mask, &xwc);
+ screen->handleCompizEvent ("decor", "window_decorated", o);
return false;
}
@@ -1251,15 +1258,16 @@ DecorWindow::windowNotify (CompWindowNotify n)
{
case CompWindowNotifyReparent:
update (true);
- /* We get the notification for shade before the window is
- * actually resized which means that calling update ->
- * damageOutputExtents here will not do anything useful for us
- * so we need to track when windows are (un)shading and then wait
- * for the following resize notification to actually
- * update their decoration (since at this point they would have
- * been resized)
- */
+ break;
case CompWindowNotifyShade:
+ /* We get the notification for shade before the window is
+ * actually resized which means that calling update ->
+ * damageOutputExtents here will not do anything useful for us
+ * so we need to track when windows are (un)shading and then wait
+ * for the following resize notification to actually
+ * update their decoration (since at this point they would have
+ * been resized)
+ */
shading = true;
unshading = false;
break;
diff --git a/plugins/resize/src/resize.cpp b/plugins/resize/src/resize.cpp
index a2b3bb8..d38e604 100644
--- a/plugins/resize/src/resize.cpp
+++ b/plugins/resize/src/resize.cpp
@@ -1040,8 +1040,8 @@ ResizeScreen::handleMotionEvent (int xRoot, int yRoot)
/* only constrain movement if previous position was valid */
if (inRegionStatus)
{
- bool xStatus;
- int yForXResize;
+ bool xStatus = false;
+ int yForXResize = y;
int nx = x;
int nw = wi;
int nh = he;
@@ -1636,7 +1636,7 @@ ResizeScreen::optionChanged (CompOption *option,
ResizeOptions::Options num)
{
int *mask = NULL;
- int valueMask;
+ int valueMask = 0;
switch (num)
{
diff --git a/plugins/scale/src/scale.cpp b/plugins/scale/src/scale.cpp
index 44adaf7..8fbcbb3 100644
--- a/plugins/scale/src/scale.cpp
+++ b/plugins/scale/src/scale.cpp
@@ -1418,7 +1418,7 @@ PrivateScaleScreen::hoverTimeout ()
void
PrivateScaleScreen::handleEvent (XEvent *event)
{
- CompWindow *w;
+ CompWindow *w = NULL;
switch (event->type) {
case KeyPress:
@@ -1577,10 +1577,12 @@ PrivateScaleScreen::handleEvent (XEvent *event)
switch (event->type) {
case UnmapNotify:
- windowRemove (w);
+ if (w)
+ windowRemove (w);
break;
case DestroyNotify:
- windowRemove (w);
+ if (w)
+ windowRemove (w);
break;
}
}