summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--0001-Don-t-increase-leave-pendingMaps-at-a-non-zero-numbe.patch233
1 files changed, 0 insertions, 233 deletions
diff --git a/0001-Don-t-increase-leave-pendingMaps-at-a-non-zero-numbe.patch b/0001-Don-t-increase-leave-pendingMaps-at-a-non-zero-numbe.patch
deleted file mode 100644
index 5d3b135..0000000
--- a/0001-Don-t-increase-leave-pendingMaps-at-a-non-zero-numbe.patch
+++ /dev/null
@@ -1,233 +0,0 @@
-From b235dc3c42c56fb4737a884672ab178eaede4154 Mon Sep 17 00:00:00 2001
-From: Sam Spilsbury <smspillaz@gmail.com>
-Date: Sat, 6 Nov 2010 14:27:50 +0800
-Subject: [PATCH] Don't increase leave pendingMaps at a non-zero number once the window is mapped.
-
-We used to assume that for every MapRequest event that we got for which we also sent an XMapWindow that we would get a MapNotify.
-
-According to the man XMapWindow this doesn't make any sense since trying calling XMapWindow on an already mapped window for which we have SubstructureRedirectMask set results in a NoOp anyways (so we'll only ever get one MapNotify and multiple MapRequests).
-
-This fixes a case where no input focus would be set on closing windows with multiple remaining pendingMaps since we don't move the input focus if this is the case
----
- src/event.cpp | 10 +++++-----
- src/window.cpp | 40 +++++++++++++++++++++-------------------
- 2 files changed, 26 insertions(+), 24 deletions(-)
-
-diff --git a/src/event.cpp b/src/event.cpp
-index 15768d1..c779efb 100644
---- a/src/event.cpp
-+++ b/src/event.cpp
-@@ -764,7 +764,7 @@ PrivateScreen::handleActionEvent (XEvent *event)
-
- o[6].setName ("time", CompOption::TypeInt);
- o[6].value ().set ((int) event->xcrossing.time);
--
-+
- o.resize (7);
-
- foreach (CompPlugin *p, CompPlugin::getPlugins ())
-@@ -801,7 +801,7 @@ PrivateScreen::handleActionEvent (XEvent *event)
-
- o[6].setName ("time", CompOption::TypeInt);
- o[6].value ().set ((int) event->xcrossing.time);
--
-+
- o.resize (7);
-
- if (triggerEdgeEnter (edge, state, o))
-@@ -849,7 +849,7 @@ PrivateScreen::handleActionEvent (XEvent *event)
- o[3].value ().set ((int) 0); /* fixme */
- o[4].value ().set ((int) 0); /* fixme */
- o[5].value ().set ((int) root);
--
-+
- o.resize (6);
-
- foreach (CompPlugin *p, CompPlugin::getPlugins ())
-@@ -895,7 +895,7 @@ PrivateScreen::handleActionEvent (XEvent *event)
- o[3].value ().set ((int) event->xclient.data.l[2] >> 16);
- o[4].value ().set ((int) event->xclient.data.l[2] & 0xffff);
- o[5].value ().set ((int) root);
--
-+
- o.resize (6);
-
- if (triggerEdgeEnter (edge, state, o))
-@@ -1734,7 +1734,7 @@ CompScreen::handleEvent (XEvent *event)
- {
- w = findWindow (((XShapeEvent *) event)->window);
- if (w)
-- {
-+ {
- if (w->mapNum ())
- w->priv->updateRegion ();
- }
-diff --git a/src/window.cpp b/src/window.cpp
-index 6f58335..623192f 100644
---- a/src/window.cpp
-+++ b/src/window.cpp
-@@ -803,7 +803,7 @@ PrivateWindow::updateFrameWindow ()
- {
- int x, y, width, height;
- int bw = serverGeometry.border () * 2;
--
-+
- x = serverGeometry.x ();
- y = serverGeometry.y ();
- width = serverGeometry.width () + bw;
-@@ -1279,7 +1279,9 @@ CompWindow::map ()
- if (!isViewable ())
- {
- if (priv->pendingMaps > 0)
-- priv->pendingMaps--;
-+ {
-+ priv->pendingMaps = 0;
-+ }
-
- priv->mapNum = screen->priv->mapNum++;
-
-@@ -2836,7 +2838,7 @@ CompWindow::moveResize (XWindowChanges *xwc,
- bool placed = false;
-
- xwcm &= (CWX | CWY | CWWidth | CWHeight | CWBorderWidth);
--
-+
- if (xwcm & (CWX | CWY))
- if (priv->sizeHints.flags & (USPosition | PPosition))
- placed = true;
-@@ -2882,7 +2884,7 @@ CompWindow::moveResize (XWindowChanges *xwc,
-
- min = screen->workArea ().y () + priv->input.top;
- max = screen->workArea ().bottom ();
--
-+
- if (priv->state & CompWindowStateStickyMask &&
- (xwc->y < min || xwc->y > max))
- {
-@@ -2893,7 +2895,7 @@ CompWindow::moveResize (XWindowChanges *xwc,
- min -= screen->vp ().y () * screen->height ();
- max += (screen->vpSize ().height () - screen->vp ().y () - 1) *
- screen->height ();
--
-+
- if (xwc->y < min)
- xwc->y = min;
- else if (xwc->y > max)
-@@ -2907,7 +2909,7 @@ CompWindow::moveResize (XWindowChanges *xwc,
-
- min = screen->workArea ().x () + priv->input.left;
- max = screen->workArea ().right ();
--
-+
- if (priv->state & CompWindowStateStickyMask &&
- (xwc->x < min || xwc->x > max))
- {
-@@ -3106,7 +3108,7 @@ PrivateScreen::focusTopMostWindow ()
- for (; it != windows.rend (); it++)
- {
- CompWindow *w = *it;
--
-+
- if (w->type () & CompWindowTypeDockMask)
- continue;
-
-@@ -3134,12 +3136,12 @@ CompWindow::lower ()
- {
- XWindowChanges xwc;
- int mask;
--
-+
- mask = priv->addWindowStackChanges (&xwc,
- PrivateWindow::findLowestSiblingBelow (this));
- if (mask)
- configureXWindow (mask, &xwc);
--
-+
- /* when lowering a window, focus the topmost window if
- the click-to-focus option is on */
- if ((screen->getOption ("click_to_focus")->value ().b ()))
-@@ -3698,7 +3700,7 @@ void
- CompWindow::minimize ()
- {
- WRAPABLE_HND_FUNC (13, minimize);
--
-+
- if (!priv->managed)
- return;
-
-@@ -4902,7 +4904,7 @@ PrivateWindow::updateStartupId ()
- {
- if (strcmp (startupId, oldId) == 0)
- newId = false;
--
-+
- free (oldId);
- }
-
-@@ -5439,7 +5441,7 @@ CompWindow::updateFrameRegion ()
-
- x = priv->geometry.x () - priv->input.left;
- y = priv->geometry.y () - priv->input.top;
--
-+
- XShapeCombineRegion (screen->dpy (), priv->frame,
- ShapeBounding, -x, -y,
- priv->frameRegion.united (priv->region).handle (),
-@@ -5492,7 +5494,7 @@ CompWindow::updateFrameRegion (CompRegion& region)
-
- bool
- PrivateWindow::reparent ()
--{
-+{
- XSetWindowAttributes attr;
- XWindowAttributes wa;
- XWindowChanges xwc;
-@@ -5589,7 +5591,7 @@ PrivateWindow::reparent ()
- ExposureMask);
-
- XUngrabServer (dpy);
--
-+
- XMoveResizeWindow (dpy, frame, sg.x (), sg.y (), sg.width (), sg.height ());
-
- /* Try to use a relative window as a stacking anchor point */
-@@ -5608,7 +5610,7 @@ PrivateWindow::reparent ()
-
- void
- PrivateWindow::unreparent ()
--{
-+{
- Display *dpy = screen->dpy ();
- XEvent e;
- bool alive = true;
-@@ -5634,13 +5636,13 @@ PrivateWindow::unreparent ()
- XSelectInput (dpy, id, NoEventMask);
- XSelectInput (dpy, screen->root (), NoEventMask);
- XReparentWindow (dpy, id, screen->root (), 0, 0);
--
-+
- xwc.stack_mode = Below;
- xwc.sibling = frame;
- XConfigureWindow (dpy, id, CWSibling | CWStackMode, &xwc);
-
- XUnmapWindow (dpy, frame);
--
-+
- XSelectInput (dpy, id, PropertyChangeMask | EnterWindowMask |
- FocusChangeMask);
-
-@@ -5657,9 +5659,9 @@ PrivateWindow::unreparent ()
- ButtonReleaseMask |
- FocusChangeMask |
- ExposureMask);
--
-+
- XUngrabServer (dpy);
--
-+
- XMoveWindow (dpy, id, serverGeometry.x (), serverGeometry.y ());
- }
-
---
-1.7.1
-