Merge lp:~compiz-team/compiz/0.9.11.2 into lp:compiz/0.9.11
- 0.9.11.2
- Merge into 0.9.11
Status: | Merged |
---|---|
Approved by: | Stephen M. Webb |
Approved revision: | 3865 |
Merged at revision: | 3864 |
Proposed branch: | lp:~compiz-team/compiz/0.9.11.2 |
Merge into: | lp:compiz/0.9.11 |
Diff against target: |
754 lines (+289/-106) 11 files modified
debian/changelog (+14/-0) debian/compiz-core.install (+0/-1) debian/compiz-plugins-default.install (+1/-0) debian/compiz-plugins.install (+1/-0) debian/compiz-plugins.install.armel (+1/-0) debian/compiz-plugins.install.armhf (+1/-0) debian/control (+2/-0) plugins/scale/include/scale/scale.h (+0/-1) plugins/scale/scale.xml.in (+14/-0) plugins/scale/src/privates.h (+10/-4) plugins/scale/src/scale.cpp (+245/-100) |
To merge this branch: | bzr merge lp:~compiz-team/compiz/0.9.11.2 |
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stephen M. Webb | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email: mp+226510@code.launchpad.net |
Commit message
Prepare for upstream micro-release 0.9.11.2 which includes fixes for the following bugs:
Bug #607796: Launcher, Window management - Dragging and holding a selection over an entry in the Launcher should spread out windows belonging to that application
Bug #727904: Launcher, Window management - Switching between spreads when dragging a file over the Launcher is broken
Bug #1308112: Scale should not select a window when clicking on an empty area
Description of the change
Prepare for upstream micro-release 0.9.11.2.
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:3865
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Stephen M. Webb (bregma) wrote : | # |
OK, lets get this in to 14.04
- 3866. By Christopher Townsend
-
Previously merged in wrong value for breaks/replaces and this fixes it.
Preview Diff
1 | === modified file 'debian/changelog' | |||
2 | --- debian/changelog 2014-07-01 11:51:27 +0000 | |||
3 | +++ debian/changelog 2014-07-14 13:30:01 +0000 | |||
4 | @@ -1,3 +1,17 @@ | |||
5 | 1 | compiz (1:0.9.11.1+14.04.20140701-0ubuntu2) trusty; urgency=medium | ||
6 | 2 | |||
7 | 3 | [ Marco Trevisan (TreviƱo) ] | ||
8 | 4 | * Scale: use XShape extension to exclude dnd input in the screen-parts | ||
9 | 5 | outside workArea This will work property also in multi-monitor, | ||
10 | 6 | without requiring multiple X windows for each output device. Also | ||
11 | 7 | don't terminate the scale unless a drag-n-drop action is not really | ||
12 | 8 | over. Add a spinner that shows up over a window, during the DnD | ||
13 | 9 | timeout. Plus, make sure we terminate the scale without focusing the | ||
14 | 10 | selected icon when cancelling it and some code cleanup (LP: #607796) | ||
15 | 11 | (LP: #727904) (LP: #1308112) | ||
16 | 12 | |||
17 | 13 | -- Chris Townsend <christopher.townsend@canonical.com> Fri, 11 Jul 2014 12:26:28 -0400 | ||
18 | 14 | |||
19 | 1 | compiz (1:0.9.11.1+14.04.20140701-0ubuntu1) trusty; urgency=medium | 15 | compiz (1:0.9.11.1+14.04.20140701-0ubuntu1) trusty; urgency=medium |
20 | 2 | 16 | ||
21 | 3 | [ Chris Townsend ] | 17 | [ Chris Townsend ] |
22 | 4 | 18 | ||
23 | === modified file 'debian/compiz-core.install' | |||
24 | --- debian/compiz-core.install 2012-06-19 11:22:48 +0000 | |||
25 | +++ debian/compiz-core.install 2014-07-14 13:30:01 +0000 | |||
26 | @@ -1,6 +1,5 @@ | |||
27 | 1 | debian/tmp/usr/bin/compiz* | 1 | debian/tmp/usr/bin/compiz* |
28 | 2 | debian/tmp/usr/lib/libcompiz_core.so.* | 2 | debian/tmp/usr/lib/libcompiz_core.so.* |
29 | 3 | debian/tmp/usr/share/compiz/cube/images/*.png | ||
30 | 4 | debian/tmp/usr/share/compiz/*.png | 3 | debian/tmp/usr/share/compiz/*.png |
31 | 5 | debian/tmp/usr/share/compiz/core.xml | 4 | debian/tmp/usr/share/compiz/core.xml |
32 | 6 | debian/source_compiz.py usr/share/apport/package-hooks | 5 | debian/source_compiz.py usr/share/apport/package-hooks |
33 | 7 | 6 | ||
34 | === modified file 'debian/compiz-plugins-default.install' | |||
35 | --- debian/compiz-plugins-default.install 2013-08-19 15:39:46 +0000 | |||
36 | +++ debian/compiz-plugins-default.install 2014-07-14 13:30:01 +0000 | |||
37 | @@ -17,6 +17,7 @@ | |||
38 | 17 | debian/tmp/usr/*/compiz/*regex.* | 17 | debian/tmp/usr/*/compiz/*regex.* |
39 | 18 | debian/tmp/usr/*/compiz/*resize.* | 18 | debian/tmp/usr/*/compiz/*resize.* |
40 | 19 | debian/tmp/usr/*/compiz/*scale.* | 19 | debian/tmp/usr/*/compiz/*scale.* |
41 | 20 | debian/tmp/usr/share/compiz/scale | ||
42 | 20 | debian/tmp/usr/*/compiz/*session.* | 21 | debian/tmp/usr/*/compiz/*session.* |
43 | 21 | debian/tmp/usr/*/compiz/*snap.* | 22 | debian/tmp/usr/*/compiz/*snap.* |
44 | 22 | debian/tmp/usr/*/compiz/*vpswitch.* | 23 | debian/tmp/usr/*/compiz/*vpswitch.* |
45 | 23 | 24 | ||
46 | === modified file 'debian/compiz-plugins.install' | |||
47 | --- debian/compiz-plugins.install 2013-08-19 15:39:46 +0000 | |||
48 | +++ debian/compiz-plugins.install 2014-07-14 13:30:01 +0000 | |||
49 | @@ -4,6 +4,7 @@ | |||
50 | 4 | debian/tmp/usr/*/compiz/*clone.* | 4 | debian/tmp/usr/*/compiz/*clone.* |
51 | 5 | debian/tmp/usr/*/compiz/*crashhandler.* | 5 | debian/tmp/usr/*/compiz/*crashhandler.* |
52 | 6 | debian/tmp/usr/*/compiz/*cube.* | 6 | debian/tmp/usr/*/compiz/*cube.* |
53 | 7 | debian/tmp/usr/share/compiz/cube | ||
54 | 7 | debian/tmp/usr/*/compiz/*cubeaddon.* | 8 | debian/tmp/usr/*/compiz/*cubeaddon.* |
55 | 8 | debian/tmp/usr/share/compiz/cubeaddon | 9 | debian/tmp/usr/share/compiz/cubeaddon |
56 | 9 | debian/tmp/usr/*/compiz/*dbus.* | 10 | debian/tmp/usr/*/compiz/*dbus.* |
57 | 10 | 11 | ||
58 | === modified file 'debian/compiz-plugins.install.armel' | |||
59 | --- debian/compiz-plugins.install.armel 2013-07-28 10:35:40 +0000 | |||
60 | +++ debian/compiz-plugins.install.armel 2014-07-14 13:30:01 +0000 | |||
61 | @@ -5,6 +5,7 @@ | |||
62 | 5 | debian/tmp/usr/*/compiz/*copytex.* | 5 | debian/tmp/usr/*/compiz/*copytex.* |
63 | 6 | debian/tmp/usr/*/compiz/*crashhandler.* | 6 | debian/tmp/usr/*/compiz/*crashhandler.* |
64 | 7 | debian/tmp/usr/*/compiz/*cube.* | 7 | debian/tmp/usr/*/compiz/*cube.* |
65 | 8 | debian/tmp/usr/share/compiz/cube | ||
66 | 8 | debian/tmp/usr/*/compiz/*cubeaddon.* | 9 | debian/tmp/usr/*/compiz/*cubeaddon.* |
67 | 9 | debian/tmp/usr/share/compiz/cubeaddon | 10 | debian/tmp/usr/share/compiz/cubeaddon |
68 | 10 | debian/tmp/usr/*/compiz/*dbus.* | 11 | debian/tmp/usr/*/compiz/*dbus.* |
69 | 11 | 12 | ||
70 | === modified file 'debian/compiz-plugins.install.armhf' | |||
71 | --- debian/compiz-plugins.install.armhf 2013-07-28 10:35:40 +0000 | |||
72 | +++ debian/compiz-plugins.install.armhf 2014-07-14 13:30:01 +0000 | |||
73 | @@ -5,6 +5,7 @@ | |||
74 | 5 | debian/tmp/usr/*/compiz/*copytex.* | 5 | debian/tmp/usr/*/compiz/*copytex.* |
75 | 6 | debian/tmp/usr/*/compiz/*crashhandler.* | 6 | debian/tmp/usr/*/compiz/*crashhandler.* |
76 | 7 | debian/tmp/usr/*/compiz/*cube.* | 7 | debian/tmp/usr/*/compiz/*cube.* |
77 | 8 | debian/tmp/usr/share/compiz/cube | ||
78 | 8 | debian/tmp/usr/*/compiz/*cubeaddon.* | 9 | debian/tmp/usr/*/compiz/*cubeaddon.* |
79 | 9 | debian/tmp/usr/share/compiz/cubeaddon | 10 | debian/tmp/usr/share/compiz/cubeaddon |
80 | 10 | debian/tmp/usr/*/compiz/*dbus.* | 11 | debian/tmp/usr/*/compiz/*dbus.* |
81 | 11 | 12 | ||
82 | === modified file 'debian/control' | |||
83 | --- debian/control 2014-02-16 21:23:37 +0000 | |||
84 | +++ debian/control 2014-07-14 13:30:01 +0000 | |||
85 | @@ -188,8 +188,10 @@ | |||
86 | 188 | Replaces: compiz-plugins-main (<< 1:0.9.8), | 188 | Replaces: compiz-plugins-main (<< 1:0.9.8), |
87 | 189 | compiz-plugins-extra (<< 1:0.9.8), | 189 | compiz-plugins-extra (<< 1:0.9.8), |
88 | 190 | compiz-plugins-main-default (<< 1:0.9.8), | 190 | compiz-plugins-main-default (<< 1:0.9.8), |
89 | 191 | compiz-core (<= 1:0.9.11.1+14.04.20140701-0ubuntu1), | ||
90 | 191 | Breaks: compiz-plugins-main (<< 1:0.9.8), | 192 | Breaks: compiz-plugins-main (<< 1:0.9.8), |
91 | 192 | compiz-plugins-extra (<< 1:0.9.8), | 193 | compiz-plugins-extra (<< 1:0.9.8), |
92 | 194 | compiz-core (<= 1:0.9.11.1+14.04.20140701-0ubuntu1), | ||
93 | 193 | Description: OpenGL window and compositing manager - plugins | 195 | Description: OpenGL window and compositing manager - plugins |
94 | 194 | Compiz brings to life a variety of visual effects that make the Linux desktop | 196 | Compiz brings to life a variety of visual effects that make the Linux desktop |
95 | 195 | easier to use, more powerful and intuitive, and more accessible for users | 197 | easier to use, more powerful and intuitive, and more accessible for users |
96 | 196 | 198 | ||
97 | === added directory 'plugins/scale/images' | |||
98 | === added file 'plugins/scale/images/dnd-spinner-000.png' | |||
99 | 197 | Binary files plugins/scale/images/dnd-spinner-000.png 1970-01-01 00:00:00 +0000 and plugins/scale/images/dnd-spinner-000.png 2014-07-14 13:30:01 +0000 differ | 199 | Binary files plugins/scale/images/dnd-spinner-000.png 1970-01-01 00:00:00 +0000 and plugins/scale/images/dnd-spinner-000.png 2014-07-14 13:30:01 +0000 differ |
100 | === added file 'plugins/scale/images/dnd-spinner-125.png' | |||
101 | 198 | Binary files plugins/scale/images/dnd-spinner-125.png 1970-01-01 00:00:00 +0000 and plugins/scale/images/dnd-spinner-125.png 2014-07-14 13:30:01 +0000 differ | 200 | Binary files plugins/scale/images/dnd-spinner-125.png 1970-01-01 00:00:00 +0000 and plugins/scale/images/dnd-spinner-125.png 2014-07-14 13:30:01 +0000 differ |
102 | === added file 'plugins/scale/images/dnd-spinner-250.png' | |||
103 | 199 | Binary files plugins/scale/images/dnd-spinner-250.png 1970-01-01 00:00:00 +0000 and plugins/scale/images/dnd-spinner-250.png 2014-07-14 13:30:01 +0000 differ | 201 | Binary files plugins/scale/images/dnd-spinner-250.png 1970-01-01 00:00:00 +0000 and plugins/scale/images/dnd-spinner-250.png 2014-07-14 13:30:01 +0000 differ |
104 | === added file 'plugins/scale/images/dnd-spinner-375.png' | |||
105 | 200 | Binary files plugins/scale/images/dnd-spinner-375.png 1970-01-01 00:00:00 +0000 and plugins/scale/images/dnd-spinner-375.png 2014-07-14 13:30:01 +0000 differ | 202 | Binary files plugins/scale/images/dnd-spinner-375.png 1970-01-01 00:00:00 +0000 and plugins/scale/images/dnd-spinner-375.png 2014-07-14 13:30:01 +0000 differ |
106 | === added file 'plugins/scale/images/dnd-spinner-500.png' | |||
107 | 201 | Binary files plugins/scale/images/dnd-spinner-500.png 1970-01-01 00:00:00 +0000 and plugins/scale/images/dnd-spinner-500.png 2014-07-14 13:30:01 +0000 differ | 203 | Binary files plugins/scale/images/dnd-spinner-500.png 1970-01-01 00:00:00 +0000 and plugins/scale/images/dnd-spinner-500.png 2014-07-14 13:30:01 +0000 differ |
108 | === added file 'plugins/scale/images/dnd-spinner-625.png' | |||
109 | 202 | Binary files plugins/scale/images/dnd-spinner-625.png 1970-01-01 00:00:00 +0000 and plugins/scale/images/dnd-spinner-625.png 2014-07-14 13:30:01 +0000 differ | 204 | Binary files plugins/scale/images/dnd-spinner-625.png 1970-01-01 00:00:00 +0000 and plugins/scale/images/dnd-spinner-625.png 2014-07-14 13:30:01 +0000 differ |
110 | === added file 'plugins/scale/images/dnd-spinner-750.png' | |||
111 | 203 | Binary files plugins/scale/images/dnd-spinner-750.png 1970-01-01 00:00:00 +0000 and plugins/scale/images/dnd-spinner-750.png 2014-07-14 13:30:01 +0000 differ | 205 | Binary files plugins/scale/images/dnd-spinner-750.png 1970-01-01 00:00:00 +0000 and plugins/scale/images/dnd-spinner-750.png 2014-07-14 13:30:01 +0000 differ |
112 | === added file 'plugins/scale/images/dnd-spinner-875.png' | |||
113 | 204 | Binary files plugins/scale/images/dnd-spinner-875.png 1970-01-01 00:00:00 +0000 and plugins/scale/images/dnd-spinner-875.png 2014-07-14 13:30:01 +0000 differ | 206 | Binary files plugins/scale/images/dnd-spinner-875.png 1970-01-01 00:00:00 +0000 and plugins/scale/images/dnd-spinner-875.png 2014-07-14 13:30:01 +0000 differ |
114 | === modified file 'plugins/scale/include/scale/scale.h' | |||
115 | --- plugins/scale/include/scale/scale.h 2012-10-12 09:05:18 +0000 | |||
116 | +++ plugins/scale/include/scale/scale.h 2014-07-14 13:30:01 +0000 | |||
117 | @@ -100,7 +100,6 @@ | |||
118 | 100 | 100 | ||
119 | 101 | const CompMatch & getCustomMatch () const; | 101 | const CompMatch & getCustomMatch () const; |
120 | 102 | const WindowList& getWindows () const; | 102 | const WindowList& getWindows () const; |
121 | 103 | |||
122 | 104 | 103 | ||
123 | 105 | void relayoutSlots (const CompMatch& match); | 104 | void relayoutSlots (const CompMatch& match); |
124 | 106 | 105 | ||
125 | 107 | 106 | ||
126 | === modified file 'plugins/scale/scale.xml.in' | |||
127 | --- plugins/scale/scale.xml.in 2014-02-17 20:36:26 +0000 | |||
128 | +++ plugins/scale/scale.xml.in 2014-07-14 13:30:01 +0000 | |||
129 | @@ -7,10 +7,12 @@ | |||
130 | 7 | <deps> | 7 | <deps> |
131 | 8 | <requirement> | 8 | <requirement> |
132 | 9 | <plugin>opengl</plugin> | 9 | <plugin>opengl</plugin> |
133 | 10 | <plugin>imgpng</plugin> | ||
134 | 10 | </requirement> | 11 | </requirement> |
135 | 11 | <relation type="after"> | 12 | <relation type="after"> |
136 | 12 | <plugin>fade</plugin> | 13 | <plugin>fade</plugin> |
137 | 13 | <plugin>decor</plugin> | 14 | <plugin>decor</plugin> |
138 | 15 | <plugin>imgpng</plugin> | ||
139 | 14 | </relation> | 16 | </relation> |
140 | 15 | </deps> | 17 | </deps> |
141 | 16 | <options> | 18 | <options> |
142 | @@ -104,6 +106,18 @@ | |||
143 | 104 | <min>0</min> | 106 | <min>0</min> |
144 | 105 | <max>250</max> | 107 | <max>250</max> |
145 | 106 | </option> | 108 | </option> |
146 | 109 | <option name="dnd_timeout_spinner" type="bool"> | ||
147 | 110 | <_short>Show a spinner during th Drag and Drop timeout</_short> | ||
148 | 111 | <_long>Whether to show a spinner over the windows during dnd Timeout.</_long> | ||
149 | 112 | <default>true</default> | ||
150 | 113 | </option> | ||
151 | 114 | <option name="dnd_timeout_spinner_speed" type="int"> | ||
152 | 115 | <_short>The speed of the DnD timeout spinner</_short> | ||
153 | 116 | <_long>The animation speed (in ms) of the Drag and Drop spinner.</_long> | ||
154 | 117 | <default>100</default> | ||
155 | 118 | <min>50</min> | ||
156 | 119 | <max>250</max> | ||
157 | 120 | </option> | ||
158 | 107 | <option name="multioutput_mode" type="int"> | 121 | <option name="multioutput_mode" type="int"> |
159 | 108 | <_short>Multi Output Mode</_short> | 122 | <_short>Multi Output Mode</_short> |
160 | 109 | <_long>Selects where windows are scaled if multiple output devices are used.</_long> | 123 | <_long>Selects where windows are scaled if multiple output devices are used.</_long> |
161 | 110 | 124 | ||
162 | === modified file 'plugins/scale/src/privates.h' | |||
163 | --- plugins/scale/src/privates.h 2014-02-17 03:02:06 +0000 | |||
164 | +++ plugins/scale/src/privates.h 2014-07-14 13:30:01 +0000 | |||
165 | @@ -45,7 +45,6 @@ | |||
166 | 45 | { | 45 | { |
167 | 46 | public: | 46 | public: |
168 | 47 | PrivateScaleScreen (CompScreen *); | 47 | PrivateScaleScreen (CompScreen *); |
169 | 48 | ~PrivateScaleScreen (); | ||
170 | 49 | 48 | ||
171 | 50 | void handleEvent (XEvent *event); | 49 | void handleEvent (XEvent *event); |
172 | 51 | 50 | ||
173 | @@ -57,6 +56,7 @@ | |||
174 | 57 | CompOutput *, unsigned int); | 56 | CompOutput *, unsigned int); |
175 | 58 | 57 | ||
176 | 59 | void activateEvent (bool activating); | 58 | void activateEvent (bool activating); |
177 | 59 | void terminateScale (bool accept); | ||
178 | 60 | 60 | ||
179 | 61 | void layoutSlotsForArea (const CompRect&, int); | 61 | void layoutSlotsForArea (const CompRect&, int); |
180 | 62 | void layoutSlots (); | 62 | void layoutSlots (); |
181 | @@ -70,7 +70,8 @@ | |||
182 | 70 | 70 | ||
183 | 71 | ScaleWindow * checkForWindowAt (int x, int y); | 71 | ScaleWindow * checkForWindowAt (int x, int y); |
184 | 72 | 72 | ||
186 | 73 | void sendDndStatusMessage (Window); | 73 | void sendDndStatusMessage (Window, bool asks); |
187 | 74 | void sendDndFinishedMessage (Window); | ||
188 | 74 | 75 | ||
189 | 75 | bool | 76 | bool |
190 | 76 | actionShouldToggle (CompAction *action, | 77 | actionShouldToggle (CompAction *action, |
191 | @@ -98,6 +99,7 @@ | |||
192 | 98 | void windowRemove (CompWindow *); | 99 | void windowRemove (CompWindow *); |
193 | 99 | 100 | ||
194 | 100 | bool hoverTimeout (); | 101 | bool hoverTimeout (); |
195 | 102 | bool dndCheckTimeout (); | ||
196 | 101 | 103 | ||
197 | 102 | void updateOpacity (); | 104 | void updateOpacity (); |
198 | 103 | 105 | ||
199 | @@ -121,14 +123,18 @@ | |||
200 | 121 | CompScreen::GrabHandle grabIndex; | 123 | CompScreen::GrabHandle grabIndex; |
201 | 122 | 124 | ||
202 | 123 | Window dndTarget; | 125 | Window dndTarget; |
203 | 126 | Atom xdndSelection; | ||
204 | 127 | Atom xdndFinished; | ||
205 | 128 | Atom xdndActionAsk; | ||
206 | 129 | |||
207 | 130 | std::vector<GLTexture::List> dndSpinners; | ||
208 | 124 | 131 | ||
209 | 125 | CompTimer hover; | 132 | CompTimer hover; |
210 | 133 | CompTimer dndCheck; | ||
211 | 126 | 134 | ||
212 | 127 | ScaleScreen::State state; | 135 | ScaleScreen::State state; |
213 | 128 | int moreAdjust; | 136 | int moreAdjust; |
214 | 129 | 137 | ||
215 | 130 | Cursor cursor; | ||
216 | 131 | |||
217 | 132 | std::vector<ScaleSlot> slots; | 138 | std::vector<ScaleSlot> slots; |
218 | 133 | int nSlots; | 139 | int nSlots; |
219 | 134 | 140 | ||
220 | 135 | 141 | ||
221 | === modified file 'plugins/scale/src/scale.cpp' | |||
222 | --- plugins/scale/src/scale.cpp 2014-04-04 14:44:54 +0000 | |||
223 | +++ plugins/scale/src/scale.cpp 2014-07-14 13:30:01 +0000 | |||
224 | @@ -30,7 +30,7 @@ | |||
225 | 30 | #include <sys/time.h> | 30 | #include <sys/time.h> |
226 | 31 | 31 | ||
227 | 32 | #include <X11/Xatom.h> | 32 | #include <X11/Xatom.h> |
229 | 33 | #include <X11/cursorfont.h> | 33 | #include <X11/extensions/shape.h> |
230 | 34 | 34 | ||
231 | 35 | #include <core/atoms.h> | 35 | #include <core/atoms.h> |
232 | 36 | #include <scale/scale.h> | 36 | #include <scale/scale.h> |
233 | @@ -244,6 +244,70 @@ | |||
234 | 244 | } | 244 | } |
235 | 245 | } | 245 | } |
236 | 246 | } | 246 | } |
237 | 247 | |||
238 | 248 | if (spScreen->optionGetDndTimeoutSpinner () && | ||
239 | 249 | priv->window->id() == spScreen->selectedWindow && | ||
240 | 250 | priv->slot && | ||
241 | 251 | spScreen->hover.active ()) | ||
242 | 252 | { | ||
243 | 253 | GLTexture* spinner = NULL; | ||
244 | 254 | |||
245 | 255 | if (!spScreen->dndSpinners.empty ()) | ||
246 | 256 | { | ||
247 | 257 | int speed = spScreen->optionGetDndTimeoutSpinnerSpeed (); | ||
248 | 258 | unsigned dndSpinnerIdx = (spScreen->hover.minTime() - spScreen->hover.minLeft()) / speed; | ||
249 | 259 | const GLTexture::List& tex_list = spScreen->dndSpinners[dndSpinnerIdx % spScreen->dndSpinners.size()]; | ||
250 | 260 | spinner = tex_list.empty() ? NULL : tex_list.front(); | ||
251 | 261 | } | ||
252 | 262 | |||
253 | 263 | if (spinner) | ||
254 | 264 | { | ||
255 | 265 | float scale; | ||
256 | 266 | int x, y; | ||
257 | 267 | int size; | ||
258 | 268 | int scaledWinWidth, scaledWinHeight; | ||
259 | 269 | int spinnerMaxSize = spinner->width(); | ||
260 | 270 | |||
261 | 271 | scaledWinWidth = priv->window->width () * priv->scale; | ||
262 | 272 | scaledWinHeight = priv->window->height () * priv->scale; | ||
263 | 273 | |||
264 | 274 | size = MIN (spinnerMaxSize, MIN (scaledWinWidth, scaledWinHeight)); | ||
265 | 275 | x = priv->tx + priv->window->x () + (scaledWinWidth - size) / 2; | ||
266 | 276 | y = priv->ty + priv->window->y () + (scaledWinHeight - size) / 2; | ||
267 | 277 | scale = 1.0; | ||
268 | 278 | |||
269 | 279 | if (size != spinnerMaxSize) | ||
270 | 280 | { | ||
271 | 281 | size = spinnerMaxSize; | ||
272 | 282 | scale = MIN (scaledWinWidth, scaledWinHeight) / (float) spinnerMaxSize; | ||
273 | 283 | } | ||
274 | 284 | |||
275 | 285 | priv->cWindow->addDamageRect (CompRect (x, y, size / scale, size / scale)); | ||
276 | 286 | |||
277 | 287 | mask |= PAINT_WINDOW_BLEND_MASK; | ||
278 | 288 | |||
279 | 289 | CompRegion iconReg (0, 0, size, size); | ||
280 | 290 | GLTexture::MatrixList ml (1); | ||
281 | 291 | |||
282 | 292 | ml[0] = spinner->matrix (); | ||
283 | 293 | priv->gWindow->vertexBuffer ()->begin (); | ||
284 | 294 | |||
285 | 295 | if (size) | ||
286 | 296 | priv->gWindow->glAddGeometry (ml, iconReg, iconReg); | ||
287 | 297 | |||
288 | 298 | if (priv->gWindow->vertexBuffer ()->end ()) | ||
289 | 299 | { | ||
290 | 300 | GLMatrix wTransform (transform); | ||
291 | 301 | GLWindowPaintAttrib sAttrib (attrib); | ||
292 | 302 | |||
293 | 303 | wTransform.scale (scale, scale, 1.0f); | ||
294 | 304 | wTransform.translate (x / scale, y / scale, 0.0f); | ||
295 | 305 | sAttrib.brightness *= 0.65f; | ||
296 | 306 | |||
297 | 307 | priv->gWindow->glDrawTexture (spinner, wTransform, sAttrib, mask); | ||
298 | 308 | } | ||
299 | 309 | } | ||
300 | 310 | } | ||
301 | 247 | } | 311 | } |
302 | 248 | 312 | ||
303 | 249 | bool | 313 | bool |
304 | @@ -924,6 +988,7 @@ | |||
305 | 924 | activateEvent (false); | 988 | activateEvent (false); |
306 | 925 | state = ScaleScreen::Idle; | 989 | state = ScaleScreen::Idle; |
307 | 926 | 990 | ||
308 | 991 | screen->handleEventSetEnabled (this, false); | ||
309 | 927 | cScreen->preparePaintSetEnabled (this, false); | 992 | cScreen->preparePaintSetEnabled (this, false); |
310 | 928 | cScreen->donePaintSetEnabled (this, false); | 993 | cScreen->donePaintSetEnabled (this, false); |
311 | 929 | gScreen->glPaintOutputSetEnabled (this, false); | 994 | gScreen->glPaintOutputSetEnabled (this, false); |
312 | @@ -982,7 +1047,7 @@ | |||
313 | 982 | } | 1047 | } |
314 | 983 | 1048 | ||
315 | 984 | void | 1049 | void |
317 | 985 | PrivateScaleScreen::sendDndStatusMessage (Window source) | 1050 | PrivateScaleScreen::sendDndStatusMessage (Window source, bool asks) |
318 | 986 | { | 1051 | { |
319 | 987 | XEvent xev; | 1052 | XEvent xev; |
320 | 988 | 1053 | ||
321 | @@ -994,11 +1059,36 @@ | |||
322 | 994 | xev.xclient.window = source; | 1059 | xev.xclient.window = source; |
323 | 995 | 1060 | ||
324 | 996 | xev.xclient.data.l[0] = dndTarget; | 1061 | xev.xclient.data.l[0] = dndTarget; |
326 | 997 | xev.xclient.data.l[1] = 2; | 1062 | xev.xclient.data.l[1] = 0; |
327 | 998 | xev.xclient.data.l[2] = 0; | 1063 | xev.xclient.data.l[2] = 0; |
328 | 999 | xev.xclient.data.l[3] = 0; | 1064 | xev.xclient.data.l[3] = 0; |
329 | 1000 | xev.xclient.data.l[4] = None; | 1065 | xev.xclient.data.l[4] = None; |
330 | 1001 | 1066 | ||
331 | 1067 | if (asks) | ||
332 | 1068 | { | ||
333 | 1069 | xev.xclient.data.l[1] = 1 << 0 | 1 << 1; | ||
334 | 1070 | xev.xclient.data.l[4] = xdndActionAsk; | ||
335 | 1071 | } | ||
336 | 1072 | |||
337 | 1073 | XSendEvent (screen->dpy (), source, false, 0, &xev); | ||
338 | 1074 | } | ||
339 | 1075 | |||
340 | 1076 | void | ||
341 | 1077 | PrivateScaleScreen::sendDndFinishedMessage (Window source) | ||
342 | 1078 | { | ||
343 | 1079 | XEvent xev; | ||
344 | 1080 | |||
345 | 1081 | xev.xclient.type = ClientMessage; | ||
346 | 1082 | xev.xclient.display = screen->dpy (); | ||
347 | 1083 | xev.xclient.format = 32; | ||
348 | 1084 | |||
349 | 1085 | xev.xclient.message_type = xdndFinished; | ||
350 | 1086 | xev.xclient.window = source; | ||
351 | 1087 | |||
352 | 1088 | xev.xclient.data.l[0] = dndTarget; | ||
353 | 1089 | xev.xclient.data.l[1] = 0; // Not accepted | ||
354 | 1090 | xev.xclient.data.l[2] = None; | ||
355 | 1091 | |||
356 | 1002 | XSendEvent (screen->dpy (), source, false, 0, &xev); | 1092 | XSendEvent (screen->dpy (), source, false, 0, &xev); |
357 | 1003 | } | 1093 | } |
358 | 1004 | 1094 | ||
359 | @@ -1037,7 +1127,10 @@ | |||
360 | 1037 | } | 1127 | } |
361 | 1038 | 1128 | ||
362 | 1039 | if (ss->priv->dndTarget) | 1129 | if (ss->priv->dndTarget) |
363 | 1130 | { | ||
364 | 1131 | ss->priv->dndCheck.stop (); | ||
365 | 1040 | XUnmapWindow (::screen->dpy (), ss->priv->dndTarget); | 1132 | XUnmapWindow (::screen->dpy (), ss->priv->dndTarget); |
366 | 1133 | } | ||
367 | 1041 | 1134 | ||
368 | 1042 | ss->priv->grab = false; | 1135 | ss->priv->grab = false; |
369 | 1043 | 1136 | ||
370 | @@ -1103,9 +1196,9 @@ | |||
371 | 1103 | if (!dndTarget) | 1196 | if (!dndTarget) |
372 | 1104 | { | 1197 | { |
373 | 1105 | XSetWindowAttributes attr; | 1198 | XSetWindowAttributes attr; |
375 | 1106 | long xdndVersion = 3; | 1199 | long xdndVersion = 5; |
376 | 1107 | 1200 | ||
378 | 1108 | attr.override_redirect = true; | 1201 | attr.override_redirect = True; |
379 | 1109 | 1202 | ||
380 | 1110 | dndTarget = XCreateWindow (screen->dpy (), screen->root (), | 1203 | dndTarget = XCreateWindow (screen->dpy (), screen->root (), |
381 | 1111 | 0, 0, 1, 1, 0, CopyFromParent, | 1204 | 0, 0, 1, 1, 0, CopyFromParent, |
382 | @@ -1118,9 +1211,20 @@ | |||
383 | 1118 | (unsigned char *) &xdndVersion, 1); | 1211 | (unsigned char *) &xdndVersion, 1); |
384 | 1119 | } | 1212 | } |
385 | 1120 | 1213 | ||
386 | 1214 | if (screen->XShape ()) | ||
387 | 1215 | { | ||
388 | 1216 | CompRegion workAreaRegion; | ||
389 | 1217 | |||
390 | 1218 | foreach (const CompOutput& output, screen->outputDevs ()) | ||
391 | 1219 | workAreaRegion |= output.workArea (); | ||
392 | 1220 | |||
393 | 1221 | XShapeCombineRegion (screen->dpy (), dndTarget, ShapeBounding, 0, 0, workAreaRegion.handle (), ShapeSet); | ||
394 | 1222 | } | ||
395 | 1223 | |||
396 | 1121 | XMoveResizeWindow (screen->dpy (), dndTarget, | 1224 | XMoveResizeWindow (screen->dpy (), dndTarget, |
397 | 1122 | 0, 0, screen->width (), screen->height ()); | 1225 | 0, 0, screen->width (), screen->height ()); |
398 | 1123 | XMapRaised (screen->dpy (), dndTarget); | 1226 | XMapRaised (screen->dpy (), dndTarget); |
399 | 1227 | XSync (screen->dpy (), False); | ||
400 | 1124 | 1228 | ||
401 | 1125 | return true; | 1229 | return true; |
402 | 1126 | } | 1230 | } |
403 | @@ -1212,7 +1316,7 @@ | |||
404 | 1212 | } | 1316 | } |
405 | 1213 | else if (!grabIndex) | 1317 | else if (!grabIndex) |
406 | 1214 | { | 1318 | { |
408 | 1215 | grabIndex = screen->pushGrab (cursor, "scale"); | 1319 | grabIndex = screen->pushGrab (screen->normalCursor (), "scale"); |
409 | 1216 | if (grabIndex) | 1320 | if (grabIndex) |
410 | 1217 | grab = true; | 1321 | grab = true; |
411 | 1218 | } | 1322 | } |
412 | @@ -1249,6 +1353,7 @@ | |||
413 | 1249 | 1353 | ||
414 | 1250 | cScreen->damageScreen (); | 1354 | cScreen->damageScreen (); |
415 | 1251 | 1355 | ||
416 | 1356 | screen->handleEventSetEnabled (this, true); | ||
417 | 1252 | cScreen->preparePaintSetEnabled (this, true); | 1357 | cScreen->preparePaintSetEnabled (this, true); |
418 | 1253 | cScreen->donePaintSetEnabled (this, true); | 1358 | cScreen->donePaintSetEnabled (this, true); |
419 | 1254 | gScreen->glPaintOutputSetEnabled (this, true); | 1359 | gScreen->glPaintOutputSetEnabled (this, true); |
420 | @@ -1531,35 +1636,34 @@ | |||
421 | 1531 | } | 1636 | } |
422 | 1532 | else | 1637 | else |
423 | 1533 | { | 1638 | { |
424 | 1534 | CompOption::Vector o (0); | ||
425 | 1535 | CompAction *action; | ||
426 | 1536 | |||
427 | 1537 | /* terminate scale mode if the recently closed | 1639 | /* terminate scale mode if the recently closed |
428 | 1538 | * window was the last scaled window */ | 1640 | * window was the last scaled window */ |
438 | 1539 | 1641 | terminateScale (false); | |
430 | 1540 | o.push_back (CompOption ("root", CompOption::TypeInt)); | ||
431 | 1541 | o[0].value ().set ((int) screen->root ()); | ||
432 | 1542 | |||
433 | 1543 | action = &optionGetInitiateEdge (); | ||
434 | 1544 | scaleTerminate (action, CompAction::StateCancel, o); | ||
435 | 1545 | |||
436 | 1546 | action = &optionGetInitiateKey (); | ||
437 | 1547 | scaleTerminate (action, CompAction::StateCancel, o); | ||
439 | 1548 | break; | 1642 | break; |
440 | 1549 | } | 1643 | } |
441 | 1550 | } | 1644 | } |
442 | 1551 | } | 1645 | } |
443 | 1552 | } | 1646 | } |
444 | 1553 | 1647 | ||
445 | 1648 | void PrivateScaleScreen::terminateScale (bool accept) | ||
446 | 1649 | { | ||
447 | 1650 | CompOption::Vector o (0); | ||
448 | 1651 | |||
449 | 1652 | o.push_back (CompOption ("root", CompOption::TypeInt)); | ||
450 | 1653 | o[0].value ().set ((int) screen->root ()); | ||
451 | 1654 | |||
452 | 1655 | scaleTerminate (&optionGetInitiateEdge (), accept ? 0 : CompAction::StateCancel, o); | ||
453 | 1656 | scaleTerminate (&optionGetInitiateKey (), accept ? 0 : CompAction::StateCancel, o); | ||
454 | 1657 | |||
455 | 1658 | activateEvent (false); | ||
456 | 1659 | } | ||
457 | 1660 | |||
458 | 1554 | bool | 1661 | bool |
459 | 1555 | PrivateScaleScreen::hoverTimeout () | 1662 | PrivateScaleScreen::hoverTimeout () |
460 | 1556 | { | 1663 | { |
461 | 1557 | if (grab && state != ScaleScreen::In) | 1664 | if (grab && state != ScaleScreen::In) |
462 | 1558 | { | 1665 | { |
467 | 1559 | CompWindow *w; | 1666 | CompWindow *w = screen->findWindow (selectedWindow); |
464 | 1560 | CompOption::Vector o (0); | ||
465 | 1561 | |||
466 | 1562 | w = screen->findWindow (selectedWindow); | ||
468 | 1563 | if (w) | 1667 | if (w) |
469 | 1564 | { | 1668 | { |
470 | 1565 | lastActiveNum = w->activeNum (); | 1669 | lastActiveNum = w->activeNum (); |
471 | @@ -1568,13 +1672,39 @@ | |||
472 | 1568 | w->moveInputFocusTo (); | 1672 | w->moveInputFocusTo (); |
473 | 1569 | } | 1673 | } |
474 | 1570 | 1674 | ||
482 | 1571 | o.push_back (CompOption ("root", CompOption::TypeInt)); | 1675 | terminateScale (true); |
483 | 1572 | o[0].value ().set ((int) screen->root ()); | 1676 | } |
484 | 1573 | 1677 | ||
485 | 1574 | scaleTerminate (&optionGetInitiateEdge (), 0, o); | 1678 | return false; |
486 | 1575 | scaleTerminate (&optionGetInitiateKey (), 0, o); | 1679 | } |
487 | 1576 | } | 1680 | |
488 | 1577 | 1681 | bool | |
489 | 1682 | PrivateScaleScreen::dndCheckTimeout () | ||
490 | 1683 | { | ||
491 | 1684 | if (!dndTarget) | ||
492 | 1685 | return false; | ||
493 | 1686 | |||
494 | 1687 | CompWindow *w = screen->findWindow (dndTarget); | ||
495 | 1688 | |||
496 | 1689 | if (!w || !w->isMapped ()) | ||
497 | 1690 | return false; | ||
498 | 1691 | |||
499 | 1692 | Window drag_owner = XGetSelectionOwner (screen->dpy (), xdndSelection); | ||
500 | 1693 | |||
501 | 1694 | if (drag_owner) | ||
502 | 1695 | { | ||
503 | 1696 | // evil hack because some apps (Qt) don't release the selection owner on drag finished | ||
504 | 1697 | Window root_r, child_r; | ||
505 | 1698 | int root_x_r, root_y_r, win_x_r, win_y_r; | ||
506 | 1699 | unsigned int mask; | ||
507 | 1700 | XQueryPointer (screen->dpy (), screen->root (), &root_r, &child_r, | ||
508 | 1701 | &root_x_r, &root_y_r, &win_x_r, &win_y_r, &mask); | ||
509 | 1702 | |||
510 | 1703 | if (mask & (Button1Mask | Button2Mask | Button3Mask)) | ||
511 | 1704 | return true; | ||
512 | 1705 | } | ||
513 | 1706 | |||
514 | 1707 | terminateScale (false); | ||
515 | 1578 | return false; | 1708 | return false; |
516 | 1579 | } | 1709 | } |
517 | 1580 | 1710 | ||
518 | @@ -1606,46 +1736,29 @@ | |||
519 | 1606 | state != ScaleScreen::In) | 1736 | state != ScaleScreen::In) |
520 | 1607 | { | 1737 | { |
521 | 1608 | XButtonEvent *button = &event->xbutton; | 1738 | XButtonEvent *button = &event->xbutton; |
522 | 1609 | CompOption::Vector o (0); | ||
523 | 1610 | |||
524 | 1611 | o.push_back (CompOption ("root", CompOption::TypeInt)); | ||
525 | 1612 | o[0].value ().set ((int) screen->root ()); | ||
526 | 1613 | 1739 | ||
527 | 1614 | /* Button1 terminates scale mode, other buttons can select | 1740 | /* Button1 terminates scale mode, other buttons can select |
528 | 1615 | * windows */ | 1741 | * windows */ |
562 | 1616 | if (selectWindowAt (button->x_root, button->y_root, true) && | 1742 | if (event->xbutton.button != Button1) |
563 | 1617 | event->xbutton.button == Button1) | 1743 | break; |
564 | 1618 | { | 1744 | |
565 | 1619 | scaleTerminate (&optionGetInitiateEdge (), 0, o); | 1745 | if (selectWindowAt (button->x_root, button->y_root, true)) |
566 | 1620 | scaleTerminate (&optionGetInitiateKey (), 0, o); | 1746 | { |
567 | 1621 | } | 1747 | terminateScale (true); |
568 | 1622 | else if (optionGetClickOnDesktop () == 1 && | 1748 | } |
569 | 1623 | event->xbutton.button == Button1) | 1749 | else if (optionGetClickOnDesktop () != ScaleOptions::ClickOnDesktopNone) |
570 | 1624 | { | 1750 | { |
571 | 1625 | CompPoint pointer (button->x_root, button->y_root); | 1751 | CompPoint pointer (button->x_root, button->y_root); |
572 | 1626 | CompRect workArea (screen->workArea ()); | 1752 | CompRect workArea (screen->workArea ()); |
573 | 1627 | workArea.setX (workArea.x() + optionGetXOffset ()); | 1753 | workArea.setX (workArea.x() + optionGetXOffset ()); |
574 | 1628 | workArea.setY (workArea.y() + optionGetYOffset ()); | 1754 | workArea.setY (workArea.y() + optionGetYOffset ()); |
575 | 1629 | 1755 | ||
576 | 1630 | if (workArea.contains (pointer)) | 1756 | if (workArea.contains (pointer)) |
577 | 1631 | { | 1757 | { |
578 | 1632 | scaleTerminate (&optionGetInitiateEdge (), 0, o); | 1758 | terminateScale (false); |
579 | 1633 | scaleTerminate (&optionGetInitiateKey (), 0, o); | 1759 | |
580 | 1634 | screen->enterShowDesktopMode (); | 1760 | if (optionGetClickOnDesktop () == ScaleOptions::ClickOnDesktopShowDesktop) |
581 | 1635 | } | 1761 | screen->enterShowDesktopMode (); |
549 | 1636 | } | ||
550 | 1637 | else if (optionGetClickOnDesktop () == 2 && | ||
551 | 1638 | event->xbutton.button == Button1) | ||
552 | 1639 | { | ||
553 | 1640 | CompPoint pointer (button->x_root, button->y_root); | ||
554 | 1641 | CompRect workArea (screen->workArea ()); | ||
555 | 1642 | workArea.setX (workArea.x() + optionGetXOffset ()); | ||
556 | 1643 | workArea.setY (workArea.y() + optionGetYOffset ()); | ||
557 | 1644 | |||
558 | 1645 | if (workArea.contains (pointer)) | ||
559 | 1646 | { | ||
560 | 1647 | scaleTerminate (&optionGetInitiateEdge (), 0, o); | ||
561 | 1648 | scaleTerminate (&optionGetInitiateKey (), 0, o); | ||
582 | 1649 | } | 1762 | } |
583 | 1650 | } | 1763 | } |
584 | 1651 | } | 1764 | } |
585 | @@ -1669,33 +1782,31 @@ | |||
586 | 1669 | w = screen->findWindow (event->xdestroywindow.window); | 1782 | w = screen->findWindow (event->xdestroywindow.window); |
587 | 1670 | break; | 1783 | break; |
588 | 1671 | case UnmapNotify: | 1784 | case UnmapNotify: |
589 | 1672 | |||
590 | 1673 | w = screen->findWindow (event->xunmap.window); | 1785 | w = screen->findWindow (event->xunmap.window); |
591 | 1674 | break; | 1786 | break; |
592 | 1675 | case ClientMessage: | 1787 | case ClientMessage: |
593 | 1676 | if (event->xclient.message_type == Atoms::xdndPosition) | 1788 | if (event->xclient.message_type == Atoms::xdndPosition) |
594 | 1677 | { | 1789 | { |
597 | 1678 | w = screen->findWindow (event->xclient.window); | 1790 | if (event->xclient.window == dndTarget) |
596 | 1679 | if (w) | ||
598 | 1680 | { | 1791 | { |
601 | 1681 | if (w->id () == dndTarget) | 1792 | bool acceptsDnd = false; |
600 | 1682 | sendDndStatusMessage (event->xclient.data.l[0]); | ||
602 | 1683 | 1793 | ||
606 | 1684 | if (grab && | 1794 | if (grab && state != ScaleScreen::In) |
604 | 1685 | state != ScaleScreen::In && | ||
605 | 1686 | w->id () == dndTarget) | ||
607 | 1687 | { | 1795 | { |
608 | 1796 | dndCheck.stop (); | ||
609 | 1797 | |||
610 | 1688 | ScaleWindow *sw = checkForWindowAt (pointerX, pointerY); | 1798 | ScaleWindow *sw = checkForWindowAt (pointerX, pointerY); |
611 | 1689 | if (sw && sw->priv->isScaleWin ()) | 1799 | if (sw && sw->priv->isScaleWin ()) |
612 | 1690 | { | 1800 | { |
613 | 1691 | int time; | 1801 | int time; |
614 | 1692 | 1802 | ||
615 | 1693 | time = optionGetHoverTime (); | 1803 | time = optionGetHoverTime (); |
616 | 1804 | acceptsDnd = true; | ||
617 | 1694 | 1805 | ||
618 | 1695 | if (hover.active ()) | 1806 | if (hover.active ()) |
619 | 1696 | { | 1807 | { |
620 | 1697 | int lastMotion = sqrt (pow (pointerX - lastPointerX, 2) + pow (pointerY - lastPointerY, 2)); | 1808 | int lastMotion = sqrt (pow (pointerX - lastPointerX, 2) + pow (pointerY - lastPointerY, 2)); |
622 | 1698 | 1809 | ||
623 | 1699 | if (sw->window->id () != selectedWindow || lastMotion > optionGetDndDistance ()) | 1810 | if (sw->window->id () != selectedWindow || lastMotion > optionGetDndDistance ()) |
624 | 1700 | hover.stop (); | 1811 | hover.stop (); |
625 | 1701 | } | 1812 | } |
626 | @@ -1713,24 +1824,35 @@ | |||
627 | 1713 | hover.stop (); | 1824 | hover.stop (); |
628 | 1714 | } | 1825 | } |
629 | 1715 | } | 1826 | } |
641 | 1716 | } | 1827 | |
642 | 1717 | } | 1828 | sendDndStatusMessage (event->xclient.data.l[0], acceptsDnd); |
643 | 1718 | else if (event->xclient.message_type == Atoms::xdndDrop || | 1829 | } |
644 | 1719 | event->xclient.message_type == Atoms::xdndLeave) | 1830 | } |
645 | 1720 | { | 1831 | else if (event->xclient.message_type == Atoms::xdndEnter) |
646 | 1721 | w = screen->findWindow (event->xclient.window); | 1832 | { |
647 | 1722 | if (w) | 1833 | if (event->xclient.window == dndTarget && |
648 | 1723 | { | 1834 | grab && state != ScaleScreen::In) |
649 | 1724 | if (grab && | 1835 | { |
650 | 1725 | state != ScaleScreen::In && | 1836 | dndCheck.stop (); |
651 | 1726 | w->id () == dndTarget) | 1837 | } |
652 | 1838 | } | ||
653 | 1839 | else if (event->xclient.message_type == Atoms::xdndLeave) | ||
654 | 1840 | { | ||
655 | 1841 | if (event->xclient.window == dndTarget && | ||
656 | 1842 | grab && state != ScaleScreen::In) | ||
657 | 1843 | { | ||
658 | 1844 | dndCheck.start (); | ||
659 | 1845 | } | ||
660 | 1846 | } | ||
661 | 1847 | else if (event->xclient.message_type == Atoms::xdndDrop) | ||
662 | 1848 | { | ||
663 | 1849 | if (event->xclient.window == dndTarget) | ||
664 | 1850 | { | ||
665 | 1851 | sendDndFinishedMessage (event->xclient.data.l[0]); | ||
666 | 1852 | |||
667 | 1853 | if (grab && state != ScaleScreen::In) | ||
668 | 1727 | { | 1854 | { |
675 | 1728 | CompOption::Vector o (0); | 1855 | terminateScale (true); |
670 | 1729 | o.push_back (CompOption ("root", CompOption::TypeInt)); | ||
671 | 1730 | o[0].value ().set ((int) screen->root ()); | ||
672 | 1731 | |||
673 | 1732 | scaleTerminate (&optionGetInitiateEdge (), 0, o); | ||
674 | 1733 | scaleTerminate (&optionGetInitiateKey (), 0, o); | ||
676 | 1734 | } | 1856 | } |
677 | 1735 | } | 1857 | } |
678 | 1736 | } | 1858 | } |
679 | @@ -1746,6 +1868,7 @@ | |||
680 | 1746 | 1868 | ||
681 | 1747 | switch (event->type) { | 1869 | switch (event->type) { |
682 | 1748 | case UnmapNotify: | 1870 | case UnmapNotify: |
683 | 1871 | dndCheck.start (); | ||
684 | 1749 | if (w) | 1872 | if (w) |
685 | 1750 | windowRemove (w); | 1873 | windowRemove (w); |
686 | 1751 | break; | 1874 | break; |
687 | @@ -1832,9 +1955,11 @@ | |||
688 | 1832 | grab (false), | 1955 | grab (false), |
689 | 1833 | grabIndex (0), | 1956 | grabIndex (0), |
690 | 1834 | dndTarget (None), | 1957 | dndTarget (None), |
691 | 1958 | xdndSelection (XInternAtom (screen->dpy (), "XdndSelection", False)), | ||
692 | 1959 | xdndFinished (XInternAtom (screen->dpy (), "XdndFinished", False)), | ||
693 | 1960 | xdndActionAsk (XInternAtom (screen->dpy (), "XdndActionAsk", False)), | ||
694 | 1835 | state (ScaleScreen::Idle), | 1961 | state (ScaleScreen::Idle), |
695 | 1836 | moreAdjust (false), | 1962 | moreAdjust (false), |
696 | 1837 | cursor (0), | ||
697 | 1838 | nSlots (0) | 1963 | nSlots (0) |
698 | 1839 | { | 1964 | { |
699 | 1840 | leftKeyCode = XKeysymToKeycode (screen->dpy (), XStringToKeysym ("Left")); | 1965 | leftKeyCode = XKeysymToKeycode (screen->dpy (), XStringToKeysym ("Left")); |
700 | @@ -1842,11 +1967,11 @@ | |||
701 | 1842 | upKeyCode = XKeysymToKeycode (screen->dpy (), XStringToKeysym ("Up")); | 1967 | upKeyCode = XKeysymToKeycode (screen->dpy (), XStringToKeysym ("Up")); |
702 | 1843 | downKeyCode = XKeysymToKeycode (screen->dpy (), XStringToKeysym ("Down")); | 1968 | downKeyCode = XKeysymToKeycode (screen->dpy (), XStringToKeysym ("Down")); |
703 | 1844 | 1969 | ||
704 | 1845 | cursor = XCreateFontCursor (screen->dpy (), XC_left_ptr); | ||
705 | 1846 | |||
706 | 1847 | opacity = (OPAQUE * optionGetOpacity ()) / 100; | 1970 | opacity = (OPAQUE * optionGetOpacity ()) / 100; |
707 | 1848 | 1971 | ||
708 | 1849 | hover.setCallback (boost::bind (&PrivateScaleScreen::hoverTimeout, this)); | 1972 | hover.setCallback (boost::bind (&PrivateScaleScreen::hoverTimeout, this)); |
709 | 1973 | dndCheck.setCallback (boost::bind (&PrivateScaleScreen::dndCheckTimeout, this)); | ||
710 | 1974 | dndCheck.setTimes (200); | ||
711 | 1850 | 1975 | ||
712 | 1851 | optionSetOpacityNotify (boost::bind (&PrivateScaleScreen::updateOpacity, this)); | 1976 | optionSetOpacityNotify (boost::bind (&PrivateScaleScreen::updateOpacity, this)); |
713 | 1852 | 1977 | ||
714 | @@ -1883,15 +2008,35 @@ | |||
715 | 1883 | 2008 | ||
716 | 1884 | #undef SCALEBIND | 2009 | #undef SCALEBIND |
717 | 1885 | 2010 | ||
718 | 2011 | CompString pluginName("scale"); | ||
719 | 2012 | CompSize size; | ||
720 | 2013 | CompString file; | ||
721 | 2014 | |||
722 | 2015 | file = "dnd-spinner-000.png"; | ||
723 | 2016 | dndSpinners.push_back(GLTexture::readImageToTexture(file, pluginName, size)); | ||
724 | 2017 | file = "dnd-spinner-125.png"; | ||
725 | 2018 | dndSpinners.push_back(GLTexture::readImageToTexture(file, pluginName, size)); | ||
726 | 2019 | file = "dnd-spinner-250.png"; | ||
727 | 2020 | dndSpinners.push_back(GLTexture::readImageToTexture(file, pluginName, size)); | ||
728 | 2021 | file = "dnd-spinner-375.png"; | ||
729 | 2022 | dndSpinners.push_back(GLTexture::readImageToTexture(file, pluginName, size)); | ||
730 | 2023 | file = "dnd-spinner-500.png"; | ||
731 | 2024 | dndSpinners.push_back(GLTexture::readImageToTexture(file, pluginName, size)); | ||
732 | 2025 | file = "dnd-spinner-625.png"; | ||
733 | 2026 | dndSpinners.push_back(GLTexture::readImageToTexture(file, pluginName, size)); | ||
734 | 2027 | file = "dnd-spinner-750.png"; | ||
735 | 2028 | dndSpinners.push_back(GLTexture::readImageToTexture(file, pluginName, size)); | ||
736 | 2029 | file = "dnd-spinner-875.png"; | ||
737 | 2030 | dndSpinners.push_back(GLTexture::readImageToTexture(file, pluginName, size)); | ||
738 | 2031 | |||
739 | 1886 | ScreenInterface::setHandler (s); | 2032 | ScreenInterface::setHandler (s); |
740 | 1887 | CompositeScreenInterface::setHandler (cScreen, false); | 2033 | CompositeScreenInterface::setHandler (cScreen, false); |
741 | 1888 | GLScreenInterface::setHandler (gScreen, false); | 2034 | GLScreenInterface::setHandler (gScreen, false); |
742 | 1889 | } | ||
743 | 1890 | 2035 | ||
748 | 1891 | PrivateScaleScreen::~PrivateScaleScreen () | 2036 | screen->handleEventSetEnabled (this, false); |
749 | 1892 | { | 2037 | cScreen->preparePaintSetEnabled (this, false); |
750 | 1893 | if (cursor) | 2038 | cScreen->donePaintSetEnabled (this, false); |
751 | 1894 | XFreeCursor (screen->dpy (), cursor); | 2039 | gScreen->glPaintOutputSetEnabled (this, false); |
752 | 1895 | } | 2040 | } |
753 | 1896 | 2041 | ||
754 | 1897 | void | 2042 | void |
FAILED: Continuous integration, rev:3865 jenkins. qa.ubuntu. com/job/ compiz- 0.9.11- ci/83/ jenkins. qa.ubuntu. com/job/ compiz- 0.9.11- utopic- amd64-ci/ 11/console jenkins. qa.ubuntu. com/job/ compiz- 0.9.11- utopic- armhf-ci/ 11 jenkins. qa.ubuntu. com/job/ compiz- 0.9.11- utopic- i386-ci/ 11/console
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/compiz- 0.9.11- ci/83/rebuild
http://