Merge lp:~unity-team/compiz/x-sru1 into lp:compiz/xenial

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Andrea Azzarone
Approved revision: 4017
Merged at revision: 4011
Proposed branch: lp:~unity-team/compiz/x-sru1
Merge into: lp:compiz/xenial
Diff against target: 582 lines (+213/-37)
14 files modified
debian/changelog (+27/-0)
include/core/screen.h (+3/-0)
plugins/expo/expo.xml.in (+6/-0)
plugins/expo/src/expo.cpp (+3/-1)
plugins/opengl/src/paint.cpp (+1/-1)
plugins/scale/include/scale/scale.h (+1/-1)
plugins/scale/scale.xml.in (+7/-1)
plugins/scale/src/privates.h (+2/-2)
plugins/scale/src/scale.cpp (+83/-18)
src/event.cpp (+29/-3)
src/privatescreen.h (+7/-1)
src/privatescreen/tests/test-privatescreen.cpp (+3/-0)
src/screen.cpp (+26/-6)
src/window.cpp (+15/-3)
To merge this branch: bzr merge lp:~unity-team/compiz/x-sru1
Reviewer Review Type Date Requested Status
Andrea Azzarone Approve
Review via email: mp+295780@code.launchpad.net

Commit message

Backported fixes for the first Xenial SRU

To post a comment you must log in.
Revision history for this message
Andrea Azzarone (azzar1) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2016-04-15 05:30:50 +0000
+++ debian/changelog 2016-05-26 00:07:16 +0000
@@ -1,3 +1,30 @@
1compiz (1:0.9.12.2+16.04.20160415-0ubuntu2) UNRELEASED; urgency=medium
2
3 [ Andrea Azzarone ]
4 * Add an option to notify that a key press is actually an "auto
5 repeat" one. (LP: #1572241)
6
7 [ Alberts Muktupāvels ]
8 * OpenGL: use the number of Opaque windows around to decide whether
9 paint the bg or not (LP: #1574866)
10
11 [ Marco Trevisan (Treviño) ]
12 * Scale: use the selectedWindow as starting point when focusing a
13 window (LP: #1575168)
14 * Scale: allow to iterate through windows using Tab key
15 * Window: call stateChangeNotify when compiz state changed but before
16 changing the WM state (LP: #1521302)
17
18 [ Eleni Maria Stea ]
19 * Expo, Scale: add support for bottom offsets (LP: #1562346, LP:
20 #1573897)
21
22 [ handsome_feng ]
23 * Add a YBottomOffset value when stretch maximized windows。 (LP:
24 #1562348)
25
26 -- Andrea Azzarone <azzaronea@gmail.com> Thu, 26 May 2016 01:56:18 +0200
27
1compiz (1:0.9.12.2+16.04.20160415-0ubuntu1) xenial; urgency=medium28compiz (1:0.9.12.2+16.04.20160415-0ubuntu1) xenial; urgency=medium
229
3 [ Martin Wimpress ]30 [ Martin Wimpress ]
431
=== modified file 'include/core/screen.h'
--- include/core/screen.h 2015-10-20 22:43:42 +0000
+++ include/core/screen.h 2016-05-26 00:07:16 +0000
@@ -169,8 +169,11 @@
169{169{
170public:170public:
171 virtual void incrementDesktopWindowCount() = 0;171 virtual void incrementDesktopWindowCount() = 0;
172 virtual void incrementOpaqueDesktopWindowCount() = 0;
172 virtual void decrementDesktopWindowCount() = 0;173 virtual void decrementDesktopWindowCount() = 0;
174 virtual void decrementOpaqueDesktopWindowCount() = 0;
173 virtual int desktopWindowCount() = 0;175 virtual int desktopWindowCount() = 0;
176 virtual int opaqueDesktopWindowCount() = 0;
174protected:177protected:
175 ~DesktopWindowCount() {}178 ~DesktopWindowCount() {}
176};179};
177180
=== modified file 'plugins/expo/expo.xml.in'
--- plugins/expo/expo.xml.in 2015-10-26 17:15:43 +0000
+++ plugins/expo/expo.xml.in 2016-05-26 00:07:16 +0000
@@ -149,6 +149,12 @@
149 <_long>Vertical offset (in pixels).</_long>149 <_long>Vertical offset (in pixels).</_long>
150 <default>24</default>150 <default>24</default>
151 </option>151 </option>
152 <option name="y_bottom_offset" type="int">
153 <_short>Y Bottom Offset</_short>
154 <_long>Vertical offset from the bottom (in pixels).</_long>
155 <default>0</default>
156 <min>0</min>
157 </option>
152 <option name="distance" type="float">158 <option name="distance" type="float">
153 <_short>Camera Distance</_short>159 <_short>Camera Distance</_short>
154 <_long>The distance between the camera and the exposed viewports.</_long>160 <_long>The distance between the camera and the exposed viewports.</_long>
155161
=== modified file 'plugins/expo/src/expo.cpp'
--- plugins/expo/src/expo.cpp 2015-10-20 15:12:34 +0000
+++ plugins/expo/src/expo.cpp 2016-05-26 00:07:16 +0000
@@ -921,6 +921,8 @@
921 /* translate expo to center */921 /* translate expo to center */
922 sTransform.translate (vpSize.x () * sx * -0.5 + offsetInWorldCoordX,922 sTransform.translate (vpSize.x () * sx * -0.5 + offsetInWorldCoordX,
923 vpSize.y () * sy * 0.5 - offsetInWorldCoordY, 0.0f);923 vpSize.y () * sy * 0.5 - offsetInWorldCoordY, 0.0f);
924
925 worldScaleFactorY -= (float)optionGetYBottomOffset () / (float)output->height ();
924 sTransform.scale (worldScaleFactorX, worldScaleFactorY, 1.0f);926 sTransform.scale (worldScaleFactorX, worldScaleFactorY, 1.0f);
925927
926928
@@ -1503,7 +1505,7 @@
1503 float yS = 1.0 + ((o->height () / (float) window->height ()) - 1.0f) * sigmoidProgress (eScreen->expoCam);1505 float yS = 1.0 + ((o->height () / (float) window->height ()) - 1.0f) * sigmoidProgress (eScreen->expoCam);
1504 float xS = 1.0 + ((o->width () / (float) window->width ()) - 1.0f) * sigmoidProgress (eScreen->expoCam);1506 float xS = 1.0 + ((o->width () / (float) window->width ()) - 1.0f) * sigmoidProgress (eScreen->expoCam);
1505 wTransform.translate (window->x () + window->width (),1507 wTransform.translate (window->x () + window->width (),
1506 window->y () + window->height (),1508 window->y () + window->height () + eScreen->optionGetYBottomOffset (),
1507 0.0f);1509 0.0f);
1508 wTransform.scale (xS, yS, 1.0f);1510 wTransform.scale (xS, yS, 1.0f);
1509 wTransform.translate (-(window->x () + window->width ()),1511 wTransform.translate (-(window->x () + window->width ()),
15101512
=== modified file 'plugins/opengl/src/paint.cpp'
--- plugins/opengl/src/paint.cpp 2015-04-07 14:20:32 +0000
+++ plugins/opengl/src/paint.cpp 2016-05-26 00:07:16 +0000
@@ -86,7 +86,7 @@
86 if (!nBox)86 if (!nBox)
87 return;87 return;
8888
89 if (screen->desktopWindowCount ())89 if (screen->opaqueDesktopWindowCount ())
90 {90 {
91 if (!backgroundTextures.empty ())91 if (!backgroundTextures.empty ())
92 {92 {
9393
=== modified file 'plugins/scale/include/scale/scale.h'
--- plugins/scale/include/scale/scale.h 2014-04-15 16:47:09 +0000
+++ plugins/scale/include/scale/scale.h 2016-05-26 00:07:16 +0000
@@ -137,7 +137,7 @@
137 public:137 public:
138 ScaleWindow (CompWindow *w);138 ScaleWindow (CompWindow *w);
139 ~ScaleWindow ();139 ~ScaleWindow ();
140 140
141 CompWindow *window;141 CompWindow *window;
142142
143 bool hasSlot () const;143 bool hasSlot () const;
144144
=== modified file 'plugins/scale/scale.xml.in'
--- plugins/scale/scale.xml.in 2015-10-26 17:15:43 +0000
+++ plugins/scale/scale.xml.in 2016-05-26 00:07:16 +0000
@@ -33,7 +33,13 @@
33 </option>33 </option>
34 <option name="y_offset" type="int">34 <option name="y_offset" type="int">
35 <_short>Y Offset</_short>35 <_short>Y Offset</_short>
36 <_long>Vertical offset (in pixels).</_long>36 <_long>Vertical offset from the top (in pixels).</_long>
37 <min>0</min>
38 <default>0</default>
39 </option>
40 <option name="y_bottom_offset" type="int">
41 <_short>Y Bottom Offset</_short>
42 <_long>Vertical offset from the bottom (in pixels).</_long>)
37 <min>0</min>43 <min>0</min>
38 <default>0</default>44 <default>0</default>
39 </option>45 </option>
4046
=== modified file 'plugins/scale/src/privates.h'
--- plugins/scale/src/privates.h 2014-04-17 16:00:05 +0000
+++ plugins/scale/src/privates.h 2016-05-26 00:07:16 +0000
@@ -94,7 +94,9 @@
94 bool selectWindowAt (int x, int y, bool moveInputFocus);94 bool selectWindowAt (int x, int y, bool moveInputFocus);
95 bool selectWindowAt (int x, int y);95 bool selectWindowAt (int x, int y);
9696
97 void moveFocusWindow (CompWindow *);
97 void moveFocusWindow (int dx, int dy);98 void moveFocusWindow (int dx, int dy);
99 void moveFocusWindow (int distance);
98100
99 void windowRemove (CompWindow *);101 void windowRemove (CompWindow *);
100102
@@ -117,8 +119,6 @@
117 Window hoveredWindow;119 Window hoveredWindow;
118 Window previousActiveWindow;120 Window previousActiveWindow;
119121
120 KeyCode leftKeyCode, rightKeyCode, upKeyCode, downKeyCode;
121
122 bool grab;122 bool grab;
123 CompScreen::GrabHandle grabIndex;123 CompScreen::GrabHandle grabIndex;
124124
125125
=== modified file 'plugins/scale/src/scale.cpp'
--- plugins/scale/src/scale.cpp 2015-11-16 12:14:14 +0000
+++ plugins/scale/src/scale.cpp 2016-05-26 00:07:16 +0000
@@ -509,7 +509,7 @@
509 int nSlots = 0;509 int nSlots = 0;
510510
511 y = optionGetYOffset() + workArea.y () + spacing;511 y = optionGetYOffset() + workArea.y () + spacing;
512 height = (workArea.height () - optionGetYOffset() - (lines + 1) * spacing) / lines;512 height = (workArea.height () - optionGetYOffset () - optionGetYBottomOffset () - (lines + 1) * spacing) / lines;
513513
514 for (int i = 0; i < lines; i++)514 for (int i = 0; i < lines; i++)
515 {515 {
@@ -1528,13 +1528,67 @@
1528}1528}
15291529
1530void1530void
1531PrivateScaleScreen::moveFocusWindow (int distance)
1532{
1533 CompWindow *selected;
1534 CompWindow *next;
1535
1536 next = NULL;
1537 selected = screen->findWindow (selectedWindow ? selectedWindow : screen->activeWindow ());
1538 auto scaledWindows = windows;
1539
1540 /* Sort windows to respect the natural grid view */
1541 scaledWindows.sort ([] (ScaleWindow *sw1, ScaleWindow *sw2) {
1542 if (!sw1->priv->slot)
1543 return !sw2->priv->slot;
1544 if (!sw2->priv->slot)
1545 return true;
1546
1547 int cy1 = (sw1->priv->slot->y1 () + sw1->priv->slot->y2 ()) / 2;
1548 int cy2 = (sw2->priv->slot->y1 () + sw2->priv->slot->y2 ()) / 2;
1549
1550 if (abs (cy1 - cy2) < std::max (sw1->priv->slot->height (), sw2->priv->slot->height ()) / 2)
1551 {
1552 int cx1 = (sw1->priv->slot->x1 () + sw1->priv->slot->x2 ()) / 2;
1553 int cx2 = (sw2->priv->slot->x1 () + sw2->priv->slot->x2 ()) / 2;
1554 return cx1 < cx2;
1555 }
1556
1557 return cy1 < cy2;
1558 });
1559
1560 if (selected && !scaledWindows.empty())
1561 {
1562 SCALE_WINDOW (selected);
1563 auto selected_it = std::find (scaledWindows.begin (), scaledWindows.end (), sw);
1564
1565 if (selected_it != scaledWindows.end ())
1566 {
1567 std::advance (selected_it, distance);
1568
1569 if (selected_it == scaledWindows.end ())
1570 {
1571 if (distance > 0)
1572 selected_it = scaledWindows.begin ();
1573 else if (distance < 0)
1574 selected_it = std::prev (scaledWindows.end ());
1575 }
1576
1577 next = (*selected_it)->window;
1578 }
1579 }
1580
1581 moveFocusWindow (next);
1582}
1583
1584void
1531PrivateScaleScreen::moveFocusWindow (int dx,1585PrivateScaleScreen::moveFocusWindow (int dx,
1532 int dy)1586 int dy)
1533{1587{
1534 CompWindow *active;1588 CompWindow *active;
1535 CompWindow *focus = NULL;1589 CompWindow *focus = NULL;
15361590
1537 active = screen->findWindow (screen->activeWindow ());1591 active = screen->findWindow (selectedWindow ? selectedWindow : screen->activeWindow ());
1538 if (active)1592 if (active)
1539 {1593 {
1540 SCALE_WINDOW (active);1594 SCALE_WINDOW (active);
@@ -1547,9 +1601,9 @@
1547 cx = (sw->priv->slot->x1 () + sw->priv->slot->x2 ()) / 2;1601 cx = (sw->priv->slot->x1 () + sw->priv->slot->x2 ()) / 2;
1548 cy = (sw->priv->slot->y1 () + sw->priv->slot->y2 ()) / 2;1602 cy = (sw->priv->slot->y1 () + sw->priv->slot->y2 ()) / 2;
15491603
1550 foreach (CompWindow *w, screen->windows ())1604 foreach (ScaleWindow *w, windows)
1551 {1605 {
1552 slot = ScaleWindow::get (w)->priv->slot;1606 slot = w->priv->slot;
1553 if (!slot)1607 if (!slot)
1554 continue;1608 continue;
15551609
@@ -1566,23 +1620,29 @@
1566 continue;1620 continue;
15671621
1568 min = d;1622 min = d;
1569 focus = w;1623 focus = w->window;
1570 }1624 }
1571 }1625 }
1572 }1626 }
1573 }1627 }
15741628
1629 moveFocusWindow (focus);
1630}
1631
1632void
1633PrivateScaleScreen::moveFocusWindow (CompWindow *focus)
1634{
1575 /* move focus to the last focused window if no slot window is currently1635 /* move focus to the last focused window if no slot window is currently
1576 focused */1636 focused */
1577 if (!focus)1637 if (!focus)
1578 {1638 {
1579 foreach (CompWindow *w, screen->windows ())1639 foreach (ScaleWindow *sw, windows)
1580 {1640 {
1581 if (!ScaleWindow::get (w)->priv->slot)1641 if (!sw->priv->slot)
1582 continue;1642 continue;
15831643
1584 if (!focus || focus->activeNum () < w->activeNum ())1644 if (!focus || focus->activeNum () < sw->window->activeNum ())
1585 focus = w;1645 focus = sw->window;
1586 }1646 }
1587 }1647 }
15881648
@@ -1719,14 +1779,23 @@
1719 {1779 {
1720 if (grabIndex)1780 if (grabIndex)
1721 {1781 {
1722 if (event->xkey.keycode == leftKeyCode)1782 KeySym keySym = XkbKeycodeToKeysym (event->xany.display,
1783 event->xkey.keycode, 0, 0);
1784 if (keySym == XK_Left)
1723 moveFocusWindow (-1, 0);1785 moveFocusWindow (-1, 0);
1724 else if (event->xkey.keycode == rightKeyCode)1786 else if (keySym == XK_Right)
1725 moveFocusWindow (1, 0);1787 moveFocusWindow (1, 0);
1726 else if (event->xkey.keycode == upKeyCode)1788 else if (keySym == XK_Up)
1727 moveFocusWindow (0, -1);1789 moveFocusWindow (0, -1);
1728 else if (event->xkey.keycode == downKeyCode)1790 else if (keySym == XK_Down)
1729 moveFocusWindow (0, 1);1791 moveFocusWindow (0, 1);
1792 else if (keySym == XK_Tab)
1793 moveFocusWindow (!(event->xkey.state & ShiftMask) ? 1 : -1);
1794 else if (keySym == XK_w && (event->xkey.state & ControlMask))
1795 {
1796 if (CompWindow *selected = screen->findWindow (selectedWindow))
1797 selected->close (0);
1798 }
1730 }1799 }
1731 }1800 }
1732 break;1801 break;
@@ -1752,6 +1821,7 @@
1752 CompRect workArea (screen->currentOutputDev ().workArea ());1821 CompRect workArea (screen->currentOutputDev ().workArea ());
1753 workArea.setX (workArea.x() + optionGetXOffset ());1822 workArea.setX (workArea.x() + optionGetXOffset ());
1754 workArea.setY (workArea.y() + optionGetYOffset ());1823 workArea.setY (workArea.y() + optionGetYOffset ());
1824 workArea.setBottom (workArea.bottom () + optionGetYBottomOffset ());
17551825
1756 if (workArea.contains (pointer))1826 if (workArea.contains (pointer))
1757 {1827 {
@@ -1962,11 +2032,6 @@
1962 moreAdjust (false),2032 moreAdjust (false),
1963 nSlots (0)2033 nSlots (0)
1964{2034{
1965 leftKeyCode = XKeysymToKeycode (screen->dpy (), XStringToKeysym ("Left"));
1966 rightKeyCode = XKeysymToKeycode (screen->dpy (), XStringToKeysym ("Right"));
1967 upKeyCode = XKeysymToKeycode (screen->dpy (), XStringToKeysym ("Up"));
1968 downKeyCode = XKeysymToKeycode (screen->dpy (), XStringToKeysym ("Down"));
1969
1970 opacity = (OPAQUE * optionGetOpacity ()) / 100;2035 opacity = (OPAQUE * optionGetOpacity ()) / 100;
19712036
1972 hover.setCallback (boost::bind (&PrivateScaleScreen::hoverTimeout, this));2037 hover.setCallback (boost::bind (&PrivateScaleScreen::hoverTimeout, this));
19732038
=== modified file 'src/event.cpp'
--- src/event.cpp 2015-10-13 11:33:31 +0000
+++ src/event.cpp 2016-05-26 00:07:16 +0000
@@ -855,7 +855,7 @@
855855
856 if (o.empty ())856 if (o.empty ())
857 {857 {
858 o.resize (8);858 o.resize (9);
859 o[0].setName ("event_window", CompOption::TypeInt);859 o[0].setName ("event_window", CompOption::TypeInt);
860 o[1].setName ("window", CompOption::TypeInt);860 o[1].setName ("window", CompOption::TypeInt);
861 o[2].setName ("modifiers", CompOption::TypeInt);861 o[2].setName ("modifiers", CompOption::TypeInt);
@@ -867,6 +867,7 @@
867 {867 {
868 o[6].reset ();868 o[6].reset ();
869 o[7].reset ();869 o[7].reset ();
870 o[8].reset ();
870 }871 }
871872
872 switch (event->type) {873 switch (event->type) {
@@ -936,10 +937,14 @@
936937
937 o[6].setName ("keycode", CompOption::TypeInt);938 o[6].setName ("keycode", CompOption::TypeInt);
938 o[7].setName ("time", CompOption::TypeInt);939 o[7].setName ("time", CompOption::TypeInt);
940 o[8].setName ("is_repeated", CompOption::TypeBool);
939941
940 o[6].value ().set ((int) event->xkey.keycode);942 o[6].value ().set ((int) event->xkey.keycode);
941 o[7].value ().set ((int) event->xkey.time);943 o[7].value ().set ((int) event->xkey.time);
942944
945 o[8].value ().set (nextKeyPressIsRepeated_);
946 nextKeyPressIsRepeated_ = false;
947
943 eventManager.resetPossibleTap();948 eventManager.resetPossibleTap();
944 foreach (CompPlugin *p, CompPlugin::getPlugins ())949 foreach (CompPlugin *p, CompPlugin::getPlugins ())
945 {950 {
@@ -966,6 +971,19 @@
966971
967 bool handled = false;972 bool handled = false;
968973
974 nextKeyPressIsRepeated_ = false;
975 if (XEventsQueued (dpy, QueuedAfterReading))
976 {
977 XEvent nev;
978 XPeekEvent (dpy, &nev);
979
980 if (nev.type == KeyPress && nev.xkey.time == event->xkey.time &&
981 nev.xkey.keycode == event->xkey.keycode)
982 {
983 nextKeyPressIsRepeated_ = true;
984 }
985 }
986
969 foreach (CompPlugin *p, CompPlugin::getPlugins ())987 foreach (CompPlugin *p, CompPlugin::getPlugins ())
970 {988 {
971 CompOption::Vector &options = p->vTable->getOptions ();989 CompOption::Vector &options = p->vTable->getOptions ();
@@ -1679,9 +1697,17 @@
1679 if (w->isViewable ())1697 if (w->isViewable ())
1680 {1698 {
1681 if (w->type () == CompWindowTypeDesktopMask)1699 if (w->type () == CompWindowTypeDesktopMask)
1682 decrementDesktopWindowCount();1700 {
1701 decrementDesktopWindowCount ();
1702 if (!w->alpha ())
1703 decrementOpaqueDesktopWindowCount ();
1704 }
1683 else if (type == CompWindowTypeDesktopMask)1705 else if (type == CompWindowTypeDesktopMask)
1684 incrementDesktopWindowCount();1706 {
1707 incrementDesktopWindowCount ();
1708 if (!w->alpha ())
1709 incrementOpaqueDesktopWindowCount ();
1710 }
1685 }1711 }
16861712
1687 w->wmType () = type;1713 w->wmType () = type;
16881714
=== modified file 'src/privatescreen.h'
--- src/privatescreen.h 2015-10-26 17:15:50 +0000
+++ src/privatescreen.h 2016-05-26 00:07:16 +0000
@@ -542,10 +542,14 @@
542 DesktopWindowCount();542 DesktopWindowCount();
543 virtual ~DesktopWindowCount() {}543 virtual ~DesktopWindowCount() {}
544 virtual void incrementDesktopWindowCount();544 virtual void incrementDesktopWindowCount();
545 virtual void incrementOpaqueDesktopWindowCount();
545 virtual void decrementDesktopWindowCount();546 virtual void decrementDesktopWindowCount();
547 virtual void decrementOpaqueDesktopWindowCount();
546 virtual int desktopWindowCount();548 virtual int desktopWindowCount();
549 virtual int opaqueDesktopWindowCount();
547private:550private:
548 int count;551 int countAll;
552 int countOpaque;
549};553};
550554
551class MapNum :555class MapNum :
@@ -818,6 +822,8 @@
818 compiz::private_screen::PluginManager pluginManager;822 compiz::private_screen::PluginManager pluginManager;
819 compiz::private_screen::WindowManager& windowManager;823 compiz::private_screen::WindowManager& windowManager;
820 CompOption::Vector resourceManager;824 CompOption::Vector resourceManager;
825
826 bool nextKeyPressIsRepeated_;
821};827};
822828
823class CompManager829class CompManager
824830
=== modified file 'src/privatescreen/tests/test-privatescreen.cpp'
--- src/privatescreen/tests/test-privatescreen.cpp 2015-10-26 17:15:50 +0000
+++ src/privatescreen/tests/test-privatescreen.cpp 2016-05-26 00:07:16 +0000
@@ -145,6 +145,7 @@
145 CompSize &size,145 CompSize &size,
146 void *&data));146 void *&data));
147 MOCK_METHOD0(desktopWindowCount, int ());147 MOCK_METHOD0(desktopWindowCount, int ());
148 MOCK_METHOD0(opaqueDesktopWindowCount, int ());
148 MOCK_METHOD0(attrib, XWindowAttributes ());149 MOCK_METHOD0(attrib, XWindowAttributes ());
149 MOCK_CONST_METHOD0(defaultIcon, CompIcon *());150 MOCK_CONST_METHOD0(defaultIcon, CompIcon *());
150 virtual bool otherGrabExist (const char *, ...) { return false; } // TODO How to mock?151 virtual bool otherGrabExist (const char *, ...) { return false; } // TODO How to mock?
@@ -183,7 +184,9 @@
183 MOCK_METHOD0(snDisplay, SnDisplay * ());184 MOCK_METHOD0(snDisplay, SnDisplay * ());
184 MOCK_CONST_METHOD0(createFailed, bool ());185 MOCK_CONST_METHOD0(createFailed, bool ());
185 MOCK_METHOD0(incrementDesktopWindowCount, void ());186 MOCK_METHOD0(incrementDesktopWindowCount, void ());
187 MOCK_METHOD0(incrementOpaqueDesktopWindowCount, void ());
186 MOCK_METHOD0(decrementDesktopWindowCount, void ());188 MOCK_METHOD0(decrementDesktopWindowCount, void ());
189 MOCK_METHOD0(decrementOpaqueDesktopWindowCount, void ());
187 MOCK_METHOD0(nextMapNum, unsigned int ());190 MOCK_METHOD0(nextMapNum, unsigned int ());
188 MOCK_CONST_METHOD0(updatePassiveKeyGrabs, void ());191 MOCK_CONST_METHOD0(updatePassiveKeyGrabs, void ());
189 MOCK_METHOD1(updatePassiveButtonGrabs, void (Window serverFrame));192 MOCK_METHOD1(updatePassiveButtonGrabs, void (Window serverFrame));
190193
=== modified file 'src/screen.cpp'
--- src/screen.cpp 2015-10-26 17:15:50 +0000
+++ src/screen.cpp 2016-05-26 00:07:16 +0000
@@ -4565,7 +4565,13 @@
4565int4565int
4566cps::DesktopWindowCount::desktopWindowCount ()4566cps::DesktopWindowCount::desktopWindowCount ()
4567{4567{
4568 return count;4568 return countAll;
4569}
4570
4571int
4572cps::DesktopWindowCount::opaqueDesktopWindowCount ()
4573{
4574 return countOpaque;
4569}4575}
45704576
4571unsigned int4577unsigned int
@@ -4879,19 +4885,32 @@
4879}4885}
48804886
4881cps::DesktopWindowCount::DesktopWindowCount() :4887cps::DesktopWindowCount::DesktopWindowCount() :
4882count(0)4888countAll(0), countOpaque(0)
4883{4889{
4884}4890}
48854891
4886void4892void
4887cps::DesktopWindowCount::incrementDesktopWindowCount()4893cps::DesktopWindowCount::incrementDesktopWindowCount()
4888{4894{
4889 count++;4895 countAll++;
4890}4896}
4897
4898void
4899cps::DesktopWindowCount::incrementOpaqueDesktopWindowCount()
4900{
4901 countOpaque++;
4902}
4903
4891void4904void
4892cps::DesktopWindowCount::decrementDesktopWindowCount()4905cps::DesktopWindowCount::decrementDesktopWindowCount()
4893{4906{
4894 count--;4907 countAll--;
4908}
4909
4910void
4911cps::DesktopWindowCount::decrementOpaqueDesktopWindowCount()
4912{
4913 countOpaque--;
4895}4914}
48964915
4897cps::MapNum::MapNum() :4916cps::MapNum::MapNum() :
@@ -5451,7 +5470,8 @@
5451 edgeWindow (None),5470 edgeWindow (None),
5452 edgeDelayTimer (),5471 edgeDelayTimer (),
5453 xdndWindow (None),5472 xdndWindow (None),
5454 windowManager(windowManager)5473 windowManager(windowManager),
5474 nextKeyPressIsRepeated_(false)
5455{5475{
5456 for (int i = 0; i < SCREEN_EDGE_NUM; i++)5476 for (int i = 0; i < SCREEN_EDGE_NUM; i++)
5457 {5477 {
54585478
=== modified file 'src/window.cpp'
--- src/window.cpp 2015-08-05 11:26:30 +0000
+++ src/window.cpp 2016-05-26 00:07:16 +0000
@@ -543,11 +543,11 @@
543543
544 recalcType ();544 recalcType ();
545 recalcActions ();545 recalcActions ();
546 stateChangeNotify (oldState);
546547
547 if (priv->managed)548 if (priv->managed)
548 screen->setWindowState (priv->state, priv->id);549 screen->setWindowState (priv->state, priv->id);
549550
550 stateChangeNotify (oldState);
551 screen->matchPropertyChanged (this);551 screen->matchPropertyChanged (this);
552}552}
553553
@@ -1372,7 +1372,11 @@
1372 screen->updateClientList ();1372 screen->updateClientList ();
13731373
1374 if (priv->type & CompWindowTypeDesktopMask)1374 if (priv->type & CompWindowTypeDesktopMask)
1375 screen->incrementDesktopWindowCount();1375 {
1376 screen->incrementDesktopWindowCount ();
1377 if (!alpha ())
1378 screen->incrementOpaqueDesktopWindowCount ();
1379 }
13761380
1377 if (priv->protocols & CompWindowProtocolSyncRequestMask)1381 if (priv->protocols & CompWindowProtocolSyncRequestMask)
1378 {1382 {
@@ -1456,7 +1460,11 @@
1456 return;1460 return;
14571461
1458 if (priv->type == CompWindowTypeDesktopMask)1462 if (priv->type == CompWindowTypeDesktopMask)
1459 screen->decrementDesktopWindowCount();1463 {
1464 screen->decrementDesktopWindowCount ();
1465 if (!alpha ())
1466 screen->decrementOpaqueDesktopWindowCount ();
1467 }
14601468
1461 priv->attrib.map_state = IsUnmapped;1469 priv->attrib.map_state = IsUnmapped;
1462 priv->invisible = true;1470 priv->invisible = true;
@@ -6333,7 +6341,11 @@
6333 if (priv->attrib.map_state == IsViewable)6341 if (priv->attrib.map_state == IsViewable)
6334 {6342 {
6335 if (priv->type == CompWindowTypeDesktopMask)6343 if (priv->type == CompWindowTypeDesktopMask)
6344 {
6336 screen->decrementDesktopWindowCount ();6345 screen->decrementDesktopWindowCount ();
6346 if (!alpha ())
6347 screen->decrementOpaqueDesktopWindowCount ();
6348 }
63376349
6338 if (priv->destroyed && priv->struts)6350 if (priv->destroyed && priv->struts)
6339 screen->updateWorkarea ();6351 screen->updateWorkarea ();

Subscribers

People subscribed via source and target branches

to all changes: