Merge lp:~vanvugt/compiz-grid-plugin/fix-910698 into lp:compiz-grid-plugin
- fix-910698
- Merge into 0.9.5
Proposed by
Daniel van Vugt
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Compiz Maintainers | Pending | ||
Review via email: mp+88984@code.launchpad.net |
Commit message
Description of the change
Copy grid fixes from oneiric-proposed, which apparently never made it upstream yet (LP: #910698)
They are fixes for:
(LP: #860257) (LP: #827560) (LP: #865177) (LP: #865179) (LP: #862260) (LP: #875557) (LP: #891886) (LP: #876591) (LP: #834585)
These changes don't need to be reviewed again, because they already got reviewed when they went into oneiric (and precise). This is just a straight file copy. And I have confirmed it builds and runs correctly.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'CMakeLists.txt' | |||
2 | --- CMakeLists.txt 2009-12-17 12:22:47 +0000 | |||
3 | +++ CMakeLists.txt 2012-01-18 07:48:23 +0000 | |||
4 | @@ -2,4 +2,6 @@ | |||
5 | 2 | 2 | ||
6 | 3 | include (CompizPlugin) | 3 | include (CompizPlugin) |
7 | 4 | 4 | ||
8 | 5 | set (CMAKE_CXX_FLAGS --std=c++0x) | ||
9 | 6 | |||
10 | 5 | compiz_plugin(grid PLUGINDEPS composite opengl) | 7 | compiz_plugin(grid PLUGINDEPS composite opengl) |
11 | 6 | 8 | ||
12 | === modified file 'src/grid.cpp' | |||
13 | --- src/grid.cpp 2011-09-29 15:54:11 +0000 | |||
14 | +++ src/grid.cpp 2012-01-18 07:48:23 +0000 | |||
15 | @@ -24,24 +24,26 @@ | |||
16 | 24 | 24 | ||
17 | 25 | #include "grid.h" | 25 | #include "grid.h" |
18 | 26 | 26 | ||
20 | 27 | static const GridProps gridProps[] = | 27 | using namespace GridWindowType; |
21 | 28 | |||
22 | 29 | static std::map <unsigned int, GridProps> gridProps; | ||
23 | 30 | |||
24 | 31 | void | ||
25 | 32 | GridScreen::handleCompizEvent(const char* plugin, | ||
26 | 33 | const char* event, | ||
27 | 34 | CompOption::Vector& o) | ||
28 | 28 | { | 35 | { |
45 | 29 | {0,1, 1,1}, | 36 | if (strcmp(event, "start_viewport_switch") == 0) |
46 | 30 | 37 | { | |
47 | 31 | {0,1, 2,2}, | 38 | mSwitchingVp = true; |
48 | 32 | {0,1, 1,2}, | 39 | } |
49 | 33 | {1,1, 2,2}, | 40 | else if (strcmp(event, "end_viewport_switch") == 0) |
50 | 34 | 41 | { | |
51 | 35 | {0,0, 2,1}, | 42 | mSwitchingVp = false; |
52 | 36 | {0,0, 1,1}, | 43 | } |
53 | 37 | {1,0, 2,1}, | 44 | |
54 | 38 | 45 | screen->handleCompizEvent(plugin, event, o); | |
55 | 39 | {0,0, 2,2}, | 46 | } |
40 | 40 | {0,0, 1,2}, | ||
41 | 41 | {1,0, 2,2}, | ||
42 | 42 | |||
43 | 43 | {0,0, 1,1}, | ||
44 | 44 | }; | ||
56 | 45 | 47 | ||
57 | 46 | CompRect | 48 | CompRect |
58 | 47 | GridScreen::slotToRect (CompWindow *w, | 49 | GridScreen::slotToRect (CompWindow *w, |
59 | @@ -83,7 +85,7 @@ | |||
60 | 83 | void | 85 | void |
61 | 84 | GridScreen::getPaintRectangle (CompRect &cRect) | 86 | GridScreen::getPaintRectangle (CompRect &cRect) |
62 | 85 | { | 87 | { |
64 | 86 | if (edgeToGridType () != GridUnknown && optionGetDrawIndicator ()) | 88 | if (typeToMask (edgeToGridType ()) != GridUnknown && optionGetDrawIndicator ()) |
65 | 87 | cRect = desiredSlot; | 89 | cRect = desiredSlot; |
66 | 88 | else | 90 | else |
67 | 89 | cRect.setGeometry (0, 0, 0, 0); | 91 | cRect.setGeometry (0, 0, 0, 0); |
68 | @@ -118,8 +120,9 @@ | |||
69 | 118 | GridScreen::initiateCommon (CompAction *action, | 120 | GridScreen::initiateCommon (CompAction *action, |
70 | 119 | CompAction::State state, | 121 | CompAction::State state, |
71 | 120 | CompOption::Vector &option, | 122 | CompOption::Vector &option, |
74 | 121 | GridType where, | 123 | unsigned int where, |
75 | 122 | bool resize) | 124 | bool resize, |
76 | 125 | bool key) | ||
77 | 123 | { | 126 | { |
78 | 124 | Window xid; | 127 | Window xid; |
79 | 125 | CompWindow *cw = 0; | 128 | CompWindow *cw = 0; |
80 | @@ -127,17 +130,30 @@ | |||
81 | 127 | xid = CompOption::getIntOptionNamed (option, "window"); | 130 | xid = CompOption::getIntOptionNamed (option, "window"); |
82 | 128 | cw = screen->findWindow (xid); | 131 | cw = screen->findWindow (xid); |
83 | 129 | 132 | ||
84 | 130 | if (where == GridUnknown || screen->otherGrabExist ("move", NULL)) | ||
85 | 131 | return false; | ||
86 | 132 | |||
87 | 133 | if (cw) | 133 | if (cw) |
88 | 134 | { | 134 | { |
89 | 135 | XWindowChanges xwc; | 135 | XWindowChanges xwc; |
90 | 136 | bool maximizeH = where & (GridBottom | GridTop | GridMaximize); | ||
91 | 137 | bool maximizeV = where & (GridLeft | GridRight | GridMaximize); | ||
92 | 138 | |||
93 | 139 | if (!(cw->actions () & CompWindowActionResizeMask)) | ||
94 | 140 | return false; | ||
95 | 141 | |||
96 | 142 | if (maximizeH && !(cw->actions () & CompWindowActionMaximizeHorzMask)) | ||
97 | 143 | return false; | ||
98 | 144 | |||
99 | 145 | if (maximizeV && !(cw->actions () & CompWindowActionMaximizeVertMask)) | ||
100 | 146 | return false; | ||
101 | 147 | |||
102 | 148 | if (where & GridUnknown) | ||
103 | 149 | return false; | ||
104 | 136 | 150 | ||
105 | 137 | GRID_WINDOW (cw); | 151 | GRID_WINDOW (cw); |
106 | 138 | 152 | ||
108 | 139 | if (gw->lastTarget != where) | 153 | if (gw->lastTarget & ~(where)) |
109 | 140 | gw->resizeCount = 0; | 154 | gw->resizeCount = 0; |
110 | 155 | else if (!key) | ||
111 | 156 | return false; | ||
112 | 141 | 157 | ||
113 | 142 | props = gridProps[where]; | 158 | props = gridProps[where]; |
114 | 143 | 159 | ||
115 | @@ -164,7 +180,7 @@ | |||
116 | 164 | cw->maximize (0); | 180 | cw->maximize (0); |
117 | 165 | } | 181 | } |
118 | 166 | 182 | ||
120 | 167 | if (where == GridMaximize && resize) | 183 | if ((where & GridMaximize) && resize) |
121 | 168 | { | 184 | { |
122 | 169 | /* move the window to the correct output */ | 185 | /* move the window to the correct output */ |
123 | 170 | if (cw == mGrabWindow) | 186 | if (cw == mGrabWindow) |
124 | @@ -198,7 +214,13 @@ | |||
125 | 198 | desiredSlot.setWidth (workarea.width () / props.numCellsX); | 214 | desiredSlot.setWidth (workarea.width () / props.numCellsX); |
126 | 199 | 215 | ||
127 | 200 | /* Adjust for constraints and decorations */ | 216 | /* Adjust for constraints and decorations */ |
129 | 201 | desiredRect = constrainSize (cw, desiredSlot); | 217 | if (where & ~(GridMaximize | GridLeft | GridRight)) |
130 | 218 | { | ||
131 | 219 | desiredRect = constrainSize (cw, desiredSlot); | ||
132 | 220 | } | ||
133 | 221 | else | ||
134 | 222 | desiredRect = slotToRect (cw, desiredSlot); | ||
135 | 223 | |||
136 | 202 | /* Get current rect not including decorations */ | 224 | /* Get current rect not including decorations */ |
137 | 203 | currentRect.setGeometry (cw->serverX (), cw->serverY (), | 225 | currentRect.setGeometry (cw->serverX (), cw->serverY (), |
138 | 204 | cw->serverWidth (), | 226 | cw->serverWidth (), |
139 | @@ -206,7 +228,7 @@ | |||
140 | 206 | 228 | ||
141 | 207 | if (desiredRect.y () == currentRect.y () && | 229 | if (desiredRect.y () == currentRect.y () && |
142 | 208 | desiredRect.height () == currentRect.height () && | 230 | desiredRect.height () == currentRect.height () && |
144 | 209 | where != GridMaximize && gw->lastTarget == where) | 231 | where & ~(GridMaximize | GridLeft | GridRight) && gw->lastTarget & where) |
145 | 210 | { | 232 | { |
146 | 211 | int slotWidth25 = workarea.width () / 4; | 233 | int slotWidth25 = workarea.width () / 4; |
147 | 212 | int slotWidth33 = (workarea.width () / 3) + cw->border ().left; | 234 | int slotWidth33 = (workarea.width () / 3) + cw->border ().left; |
148 | @@ -319,12 +341,61 @@ | |||
149 | 319 | /* TODO: animate move+resize */ | 341 | /* TODO: animate move+resize */ |
150 | 320 | if (resize) | 342 | if (resize) |
151 | 321 | { | 343 | { |
157 | 322 | cw->configureXWindow (CWX | CWY | CWWidth | CWHeight, &xwc); | 344 | unsigned int valueMask = CWX | CWY | CWWidth | CWHeight; |
153 | 323 | gw->isGridResized = true; | ||
154 | 324 | gw->isGridMaximized = false; | ||
155 | 325 | for (unsigned int i = 0; i < animations.size (); i++) | ||
156 | 326 | animations.at (i).fadingOut = true; | ||
158 | 327 | gw->lastTarget = where; | 345 | gw->lastTarget = where; |
159 | 346 | gw->currentSize = CompRect (wc.x, wc.y, wc.width, wc.height); | ||
160 | 347 | CompWindowExtents lastBorder = gw->window->border (); | ||
161 | 348 | |||
162 | 349 | gw->sizeHintsFlags = 0; | ||
163 | 350 | |||
164 | 351 | /* Special case for left and right, actually vertically maximize | ||
165 | 352 | * the window */ | ||
166 | 353 | if (where & GridLeft || where & GridRight) | ||
167 | 354 | { | ||
168 | 355 | /* First restore the window to its original size */ | ||
169 | 356 | XWindowChanges rwc; | ||
170 | 357 | |||
171 | 358 | rwc.x = gw->originalSize.x (); | ||
172 | 359 | rwc.y = gw->originalSize.y (); | ||
173 | 360 | rwc.width = gw->originalSize.width (); | ||
174 | 361 | rwc.height = gw->originalSize.height (); | ||
175 | 362 | |||
176 | 363 | cw->configureXWindow (CWX | CWY | CWWidth | CWHeight, &rwc); | ||
177 | 364 | |||
178 | 365 | gw->isGridMaximized = true; | ||
179 | 366 | gw->isGridResized = false; | ||
180 | 367 | |||
181 | 368 | /* Maximize the window */ | ||
182 | 369 | cw->maximize (CompWindowStateMaximizedVertMask); | ||
183 | 370 | /* Be evil */ | ||
184 | 371 | if (cw->sizeHints ().flags & PResizeInc) | ||
185 | 372 | { | ||
186 | 373 | gw->sizeHintsFlags |= PResizeInc; | ||
187 | 374 | gw->window->sizeHints ().flags &= ~(PResizeInc); | ||
188 | 375 | } | ||
189 | 376 | } | ||
190 | 377 | else | ||
191 | 378 | { | ||
192 | 379 | gw->isGridResized = true; | ||
193 | 380 | gw->isGridMaximized = false; | ||
194 | 381 | } | ||
195 | 382 | |||
196 | 383 | int dw = (lastBorder.left + lastBorder.right) - | ||
197 | 384 | (gw->window->border ().left + | ||
198 | 385 | gw->window->border ().right); | ||
199 | 386 | |||
200 | 387 | int dh = (lastBorder.top + lastBorder.bottom) - | ||
201 | 388 | (gw->window->border ().top + | ||
202 | 389 | gw->window->border ().bottom); | ||
203 | 390 | |||
204 | 391 | xwc.width += dw; | ||
205 | 392 | xwc.height += dh; | ||
206 | 393 | |||
207 | 394 | /* Make window the size that we want */ | ||
208 | 395 | cw->configureXWindow (valueMask, &xwc); | ||
209 | 396 | |||
210 | 397 | for (unsigned int i = 0; i < animations.size (); i++) | ||
211 | 398 | animations.at (i).fadingOut = true; | ||
212 | 328 | } | 399 | } |
213 | 329 | 400 | ||
214 | 330 | /* This centers a window if it could not be resized to the desired | 401 | /* This centers a window if it could not be resized to the desired |
215 | @@ -376,12 +447,14 @@ | |||
216 | 376 | 447 | ||
217 | 377 | for (iter = animations.begin (); iter != animations.end () && animating; iter++) | 448 | for (iter = animations.begin (); iter != animations.end () && animating; iter++) |
218 | 378 | { | 449 | { |
219 | 379 | GLushort *color; | ||
220 | 380 | Animation& anim = *iter; | 450 | Animation& anim = *iter; |
221 | 451 | float alpha = ((float) optionGetFillColorAlpha () / 65535.0f) * anim.opacity; | ||
222 | 381 | 452 | ||
226 | 382 | color = optionGetFillColor (); | 453 | /* fill rectangle */ |
227 | 383 | glColor4us (anim.opacity * color[0], anim.opacity * color[1], | 454 | glColor4f (((float) optionGetFillColorRed () / 65535.0f) * alpha, |
228 | 384 | anim.opacity * color[2], anim.opacity * color[3]); | 455 | ((float) optionGetFillColorGreen () / 65535.0f) * alpha, |
229 | 456 | ((float) optionGetFillColorBlue () / 65535.0f) * alpha, | ||
230 | 457 | alpha); | ||
231 | 385 | 458 | ||
232 | 386 | /* fill rectangle */ | 459 | /* fill rectangle */ |
233 | 387 | glRecti (anim.currentRect.x1 (), anim.currentRect.y2 (), | 460 | glRecti (anim.currentRect.x1 (), anim.currentRect.y2 (), |
234 | @@ -389,14 +462,17 @@ | |||
235 | 389 | 462 | ||
236 | 390 | /* Set outline rect smaller to avoid damage issues */ | 463 | /* Set outline rect smaller to avoid damage issues */ |
237 | 391 | anim.currentRect.setGeometry (anim.currentRect.x () + 1, | 464 | anim.currentRect.setGeometry (anim.currentRect.x () + 1, |
241 | 392 | anim.currentRect.y () + 1, | 465 | anim.currentRect.y () + 1, |
242 | 393 | anim.currentRect.width () - 2, | 466 | anim.currentRect.width () - 2, |
243 | 394 | anim.currentRect.height () - 2); | 467 | anim.currentRect.height () - 2); |
244 | 468 | |||
245 | 469 | alpha = (float) (optionGetOutlineColorAlpha () / 65535.0f) * anim.opacity; | ||
246 | 395 | 470 | ||
247 | 396 | /* draw outline */ | 471 | /* draw outline */ |
251 | 397 | color = optionGetOutlineColor (); | 472 | glColor4f (((float) optionGetOutlineColorRed () / 65535.0f) * alpha, |
252 | 398 | glColor4us (anim.opacity * color[0], anim.opacity * color[1], | 473 | ((float) optionGetOutlineColorGreen () / 65535.0f) * alpha, |
253 | 399 | anim.opacity * color[2], anim.opacity * color[3]); | 474 | ((float) optionGetOutlineColorBlue () / 65535.0f) * alpha, |
254 | 475 | alpha); | ||
255 | 400 | 476 | ||
256 | 401 | glLineWidth (2.0); | 477 | glLineWidth (2.0); |
257 | 402 | 478 | ||
258 | @@ -411,7 +487,13 @@ | |||
259 | 411 | if (!animating) | 487 | if (!animating) |
260 | 412 | { | 488 | { |
261 | 413 | /* fill rectangle */ | 489 | /* fill rectangle */ |
263 | 414 | glColor4usv (optionGetFillColor ()); | 490 | float alpha = (float) optionGetFillColorAlpha () / 65535.0f; |
264 | 491 | |||
265 | 492 | /* fill rectangle */ | ||
266 | 493 | glColor4f (((float) optionGetFillColorRed () / 65535.0f) * alpha, | ||
267 | 494 | ((float) optionGetFillColorGreen () / 65535.0f) * alpha, | ||
268 | 495 | ((float) optionGetFillColorBlue () / 65535.0f) * alpha, | ||
269 | 496 | alpha); | ||
270 | 415 | glRecti (rect.x1 (), rect.y2 (), rect.x2 (), rect.y1 ()); | 497 | glRecti (rect.x1 (), rect.y2 (), rect.x2 (), rect.y1 ()); |
271 | 416 | 498 | ||
272 | 417 | /* Set outline rect smaller to avoid damage issues */ | 499 | /* Set outline rect smaller to avoid damage issues */ |
273 | @@ -419,7 +501,14 @@ | |||
274 | 419 | rect.width () - 2, rect.height () - 2); | 501 | rect.width () - 2, rect.height () - 2); |
275 | 420 | 502 | ||
276 | 421 | /* draw outline */ | 503 | /* draw outline */ |
278 | 422 | glColor4usv (optionGetOutlineColor ()); | 504 | alpha = (float) optionGetOutlineColorAlpha () / 65535.0f; |
279 | 505 | |||
280 | 506 | /* draw outline */ | ||
281 | 507 | glColor4f (((float) optionGetOutlineColorRed () / 65535.0f) * alpha, | ||
282 | 508 | ((float) optionGetOutlineColorGreen () / 65535.0f) * alpha, | ||
283 | 509 | ((float) optionGetOutlineColorBlue () / 65535.0f) * alpha, | ||
284 | 510 | alpha); | ||
285 | 511 | |||
286 | 423 | glLineWidth (2.0); | 512 | glLineWidth (2.0); |
287 | 424 | glBegin (GL_LINE_LOOP); | 513 | glBegin (GL_LINE_LOOP); |
288 | 425 | glVertex2i (rect.x1 (), rect.y1 ()); | 514 | glVertex2i (rect.x1 (), rect.y1 ()); |
289 | @@ -452,39 +541,72 @@ | |||
290 | 452 | return status; | 541 | return status; |
291 | 453 | } | 542 | } |
292 | 454 | 543 | ||
294 | 455 | GridType | 544 | unsigned int |
295 | 545 | GridScreen::typeToMask (int t) | ||
296 | 546 | { | ||
297 | 547 | typedef struct { | ||
298 | 548 | unsigned int mask; | ||
299 | 549 | int type; | ||
300 | 550 | } GridTypeMask; | ||
301 | 551 | |||
302 | 552 | std::vector <GridTypeMask> type = | ||
303 | 553 | { | ||
304 | 554 | { GridWindowType::GridUnknown, 0 }, | ||
305 | 555 | { GridWindowType::GridBottomLeft, 1 }, | ||
306 | 556 | { GridWindowType::GridBottom, 2 }, | ||
307 | 557 | { GridWindowType::GridBottomRight, 3 }, | ||
308 | 558 | { GridWindowType::GridLeft, 4 }, | ||
309 | 559 | { GridWindowType::GridCenter, 5 }, | ||
310 | 560 | { GridWindowType::GridRight, 6 }, | ||
311 | 561 | { GridWindowType::GridTopLeft, 7 }, | ||
312 | 562 | { GridWindowType::GridTop, 8 }, | ||
313 | 563 | { GridWindowType::GridTopRight, 9 }, | ||
314 | 564 | { GridWindowType::GridMaximize, 10 } | ||
315 | 565 | }; | ||
316 | 566 | |||
317 | 567 | for (unsigned int i = 0; i < type.size (); i++) | ||
318 | 568 | { | ||
319 | 569 | GridTypeMask &tm = type[i]; | ||
320 | 570 | if (tm.type == t) | ||
321 | 571 | return tm.mask; | ||
322 | 572 | } | ||
323 | 573 | |||
324 | 574 | return GridWindowType::GridUnknown; | ||
325 | 575 | } | ||
326 | 576 | |||
327 | 577 | int | ||
328 | 456 | GridScreen::edgeToGridType () | 578 | GridScreen::edgeToGridType () |
329 | 457 | { | 579 | { |
331 | 458 | GridType ret; | 580 | int ret; |
332 | 459 | 581 | ||
333 | 460 | switch (edge) { | 582 | switch (edge) { |
334 | 461 | case Left: | 583 | case Left: |
336 | 462 | ret = (GridType) optionGetLeftEdgeAction (); | 584 | ret = (int) optionGetLeftEdgeAction (); |
337 | 463 | break; | 585 | break; |
338 | 464 | case Right: | 586 | case Right: |
340 | 465 | ret = (GridType) optionGetRightEdgeAction (); | 587 | ret = (int) optionGetRightEdgeAction (); |
341 | 466 | break; | 588 | break; |
342 | 467 | case Top: | 589 | case Top: |
344 | 468 | ret = (GridType) optionGetTopEdgeAction (); | 590 | ret = (int) optionGetTopEdgeAction (); |
345 | 469 | break; | 591 | break; |
346 | 470 | case Bottom: | 592 | case Bottom: |
348 | 471 | ret = (GridType) optionGetBottomEdgeAction (); | 593 | ret = (int) optionGetBottomEdgeAction (); |
349 | 472 | break; | 594 | break; |
350 | 473 | case TopLeft: | 595 | case TopLeft: |
352 | 474 | ret = (GridType) optionGetTopLeftCornerAction (); | 596 | ret = (int) optionGetTopLeftCornerAction (); |
353 | 475 | break; | 597 | break; |
354 | 476 | case TopRight: | 598 | case TopRight: |
356 | 477 | ret = (GridType) optionGetTopRightCornerAction (); | 599 | ret = (int) optionGetTopRightCornerAction (); |
357 | 478 | break; | 600 | break; |
358 | 479 | case BottomLeft: | 601 | case BottomLeft: |
360 | 480 | ret = (GridType) optionGetBottomLeftCornerAction (); | 602 | ret = (int) optionGetBottomLeftCornerAction (); |
361 | 481 | break; | 603 | break; |
362 | 482 | case BottomRight: | 604 | case BottomRight: |
364 | 483 | ret = (GridType) optionGetBottomRightCornerAction (); | 605 | ret = (int) optionGetBottomRightCornerAction (); |
365 | 484 | break; | 606 | break; |
366 | 485 | case NoEdge: | 607 | case NoEdge: |
367 | 486 | default: | 608 | default: |
369 | 487 | ret = GridUnknown; | 609 | ret = -1; |
370 | 488 | break; | 610 | break; |
371 | 489 | } | 611 | } |
372 | 490 | 612 | ||
373 | @@ -495,6 +617,8 @@ | |||
374 | 495 | GridScreen::handleEvent (XEvent *event) | 617 | GridScreen::handleEvent (XEvent *event) |
375 | 496 | { | 618 | { |
376 | 497 | CompOutput out; | 619 | CompOutput out; |
377 | 620 | CompWindow *w; | ||
378 | 621 | bool check = false; | ||
379 | 498 | 622 | ||
380 | 499 | screen->handleEvent (event); | 623 | screen->handleEvent (event); |
381 | 500 | 624 | ||
382 | @@ -548,7 +672,7 @@ | |||
383 | 548 | if (cScreen) | 672 | if (cScreen) |
384 | 549 | cScreen->damageRegion (desiredSlot); | 673 | cScreen->damageRegion (desiredSlot); |
385 | 550 | 674 | ||
387 | 551 | initiateCommon (0, 0, o, edgeToGridType (), false); | 675 | initiateCommon (0, 0, o, typeToMask (edgeToGridType ()), false, false); |
388 | 552 | 676 | ||
389 | 553 | if (cScreen) | 677 | if (cScreen) |
390 | 554 | cScreen->damageRegion (desiredSlot); | 678 | cScreen->damageRegion (desiredSlot); |
391 | @@ -566,7 +690,7 @@ | |||
392 | 566 | if (cScreen) | 690 | if (cScreen) |
393 | 567 | cScreen->damageRegion (desiredSlot); | 691 | cScreen->damageRegion (desiredSlot); |
394 | 568 | 692 | ||
396 | 569 | initiateCommon (0, 0, o, edgeToGridType (), false); | 693 | check = initiateCommon (NULL, 0, o, typeToMask (edgeToGridType ()), false, false); |
397 | 570 | 694 | ||
398 | 571 | if (cScreen) | 695 | if (cScreen) |
399 | 572 | cScreen->damageRegion (desiredSlot); | 696 | cScreen->damageRegion (desiredSlot); |
400 | @@ -577,7 +701,7 @@ | |||
401 | 577 | /* Begin fading previous animation instance */ | 701 | /* Begin fading previous animation instance */ |
402 | 578 | animations.at (animations.size () - 1).fadingOut = true; | 702 | animations.at (animations.size () - 1).fadingOut = true; |
403 | 579 | 703 | ||
405 | 580 | if (edge != NoEdge) | 704 | if (edge != NoEdge && check) |
406 | 581 | { | 705 | { |
407 | 582 | CompWindow *cw = screen->findWindow (screen->activeWindow ()); | 706 | CompWindow *cw = screen->findWindow (screen->activeWindow ()); |
408 | 583 | animations.push_back (Animation ()); | 707 | animations.push_back (Animation ()); |
409 | @@ -601,16 +725,35 @@ | |||
410 | 601 | lastEdge = edge; | 725 | lastEdge = edge; |
411 | 602 | } | 726 | } |
412 | 603 | 727 | ||
423 | 604 | GRID_WINDOW (screen->findWindow | 728 | w = screen->findWindow (CompOption::getIntOptionNamed (o, "window")); |
424 | 605 | (CompOption::getIntOptionNamed (o, "window"))); | 729 | |
425 | 606 | 730 | if (w) | |
426 | 607 | if ((gw->pointerBufDx > SNAPOFF_THRESHOLD || | 731 | { |
427 | 608 | gw->pointerBufDy > SNAPOFF_THRESHOLD || | 732 | GRID_WINDOW (w); |
428 | 609 | gw->pointerBufDx < -SNAPOFF_THRESHOLD || | 733 | |
429 | 610 | gw->pointerBufDy < -SNAPOFF_THRESHOLD) && | 734 | if ((gw->pointerBufDx > SNAPOFF_THRESHOLD || |
430 | 611 | gw->isGridResized && | 735 | gw->pointerBufDy > SNAPOFF_THRESHOLD || |
431 | 612 | optionGetSnapbackWindows ()) | 736 | gw->pointerBufDx < -SNAPOFF_THRESHOLD || |
432 | 613 | restoreWindow (0, 0, o); | 737 | gw->pointerBufDy < -SNAPOFF_THRESHOLD) && |
433 | 738 | gw->isGridResized && | ||
434 | 739 | optionGetSnapbackWindows ()) | ||
435 | 740 | restoreWindow (0, 0, o); | ||
436 | 741 | } | ||
437 | 742 | } | ||
438 | 743 | |||
439 | 744 | void | ||
440 | 745 | GridWindow::validateResizeRequest (unsigned int &xwcm, | ||
441 | 746 | XWindowChanges *xwc, | ||
442 | 747 | unsigned int source) | ||
443 | 748 | { | ||
444 | 749 | window->validateResizeRequest (xwcm, xwc, source); | ||
445 | 750 | |||
446 | 751 | /* Don't allow non-pagers to change | ||
447 | 752 | * the size of the window, the user | ||
448 | 753 | * specified this size, thank-you */ | ||
449 | 754 | if (isGridMaximized) | ||
450 | 755 | if (source != ClientTypePager) | ||
451 | 756 | xwcm = 0; | ||
452 | 614 | } | 757 | } |
453 | 615 | 758 | ||
454 | 616 | void | 759 | void |
455 | @@ -619,22 +762,23 @@ | |||
456 | 619 | unsigned int state, | 762 | unsigned int state, |
457 | 620 | unsigned int mask) | 763 | unsigned int mask) |
458 | 621 | { | 764 | { |
460 | 622 | if (screen->grabExist ("move")) | 765 | if ((mask & (CompWindowGrabMoveMask | CompWindowGrabButtonMask)) && |
461 | 766 | !(mask & CompWindowGrabResizeMask)) | ||
462 | 623 | { | 767 | { |
463 | 624 | gScreen->o.push_back (CompOption ("window", CompOption::TypeInt)); | ||
464 | 625 | gScreen->o[0].value ().set ((int) window->id ()); | 768 | gScreen->o[0].value ().set ((int) window->id ()); |
465 | 626 | 769 | ||
466 | 627 | screen->handleEventSetEnabled (gScreen, true); | 770 | screen->handleEventSetEnabled (gScreen, true); |
467 | 628 | gScreen->mGrabWindow = window; | 771 | gScreen->mGrabWindow = window; |
468 | 629 | pointerBufDx = pointerBufDy = 0; | 772 | pointerBufDx = pointerBufDy = 0; |
469 | 773 | grabMask = mask; | ||
470 | 630 | 774 | ||
472 | 631 | if (!isGridResized && gScreen->optionGetSnapbackWindows ()) | 775 | if (!isGridResized && !isGridMaximized && gScreen->optionGetSnapbackWindows ()) |
473 | 632 | /* Store size not including borders when grabbing with cursor */ | 776 | /* Store size not including borders when grabbing with cursor */ |
474 | 633 | originalSize = gScreen->slotToRect(window, | 777 | originalSize = gScreen->slotToRect(window, |
475 | 634 | window->serverBorderRect ()); | 778 | window->serverBorderRect ()); |
476 | 635 | } | 779 | } |
477 | 636 | 780 | ||
479 | 637 | if (screen->grabExist ("resize")) | 781 | if (mask & CompWindowGrabResizeMask) |
480 | 638 | { | 782 | { |
481 | 639 | isGridResized = false; | 783 | isGridResized = false; |
482 | 640 | resizeCount = 0; | 784 | resizeCount = 0; |
483 | @@ -649,13 +793,17 @@ | |||
484 | 649 | if (window == gScreen->mGrabWindow) | 793 | if (window == gScreen->mGrabWindow) |
485 | 650 | { | 794 | { |
486 | 651 | gScreen->initiateCommon | 795 | gScreen->initiateCommon |
488 | 652 | (0, 0, gScreen->o, gScreen->edgeToGridType (), true); | 796 | (NULL, 0, gScreen->o, gScreen->typeToMask (gScreen->edgeToGridType ()), true, |
489 | 797 | gScreen->edge != gScreen->lastResizeEdge); | ||
490 | 653 | 798 | ||
491 | 654 | screen->handleEventSetEnabled (gScreen, false); | 799 | screen->handleEventSetEnabled (gScreen, false); |
492 | 800 | grabMask = 0; | ||
493 | 655 | gScreen->mGrabWindow = NULL; | 801 | gScreen->mGrabWindow = NULL; |
494 | 802 | gScreen->o[0].value ().set (0); | ||
495 | 656 | gScreen->cScreen->damageRegion (gScreen->desiredSlot); | 803 | gScreen->cScreen->damageRegion (gScreen->desiredSlot); |
496 | 657 | } | 804 | } |
497 | 658 | 805 | ||
498 | 806 | gScreen->lastResizeEdge = gScreen->edge; | ||
499 | 659 | gScreen->edge = NoEdge; | 807 | gScreen->edge = NoEdge; |
500 | 660 | 808 | ||
501 | 661 | window->ungrabNotify (); | 809 | window->ungrabNotify (); |
502 | @@ -666,18 +814,41 @@ | |||
503 | 666 | { | 814 | { |
504 | 667 | window->moveNotify (dx, dy, immediate); | 815 | window->moveNotify (dx, dy, immediate); |
505 | 668 | 816 | ||
507 | 669 | if (isGridResized) | 817 | if (isGridResized && !isGridMaximized && !GridScreen::get (screen)->mSwitchingVp) |
508 | 670 | { | 818 | { |
511 | 671 | pointerBufDx += dx; | 819 | if (window->grabbed () && (grabMask & CompWindowGrabMoveMask)) |
512 | 672 | pointerBufDy += dy; | 820 | { |
513 | 821 | pointerBufDx += dx; | ||
514 | 822 | pointerBufDy += dy; | ||
515 | 823 | } | ||
516 | 673 | 824 | ||
517 | 674 | /* Do not allow the window to be moved while it | 825 | /* Do not allow the window to be moved while it |
518 | 675 | * is resized */ | 826 | * is resized */ |
524 | 676 | 827 | dx = currentSize.x () - window->geometry ().x (); | |
525 | 677 | window->moveNotifySetEnabled (this, false); | 828 | dy = currentSize.y () - window->geometry ().y (); |
526 | 678 | window->move (-dx, -dy); | 829 | |
527 | 679 | window->moveNotifySetEnabled (this, true); | 830 | window->move (dx, dy); |
528 | 680 | } | 831 | } |
529 | 832 | } | ||
530 | 833 | |||
531 | 834 | void | ||
532 | 835 | GridWindow::stateChangeNotify (unsigned int lastState) | ||
533 | 836 | { | ||
534 | 837 | if (lastState & MAXIMIZE_STATE && | ||
535 | 838 | !(window->state () & MAXIMIZE_STATE)) | ||
536 | 839 | lastTarget = GridUnknown; | ||
537 | 840 | else if (!(lastState & MAXIMIZE_STATE) && | ||
538 | 841 | window->state () & MAXIMIZE_STATE) | ||
539 | 842 | { | ||
540 | 843 | lastTarget = GridMaximize; | ||
541 | 844 | if (window->grabbed ()) | ||
542 | 845 | { | ||
543 | 846 | originalSize = gScreen->slotToRect (window, | ||
544 | 847 | window->serverBorderRect ()); | ||
545 | 848 | } | ||
546 | 849 | } | ||
547 | 850 | |||
548 | 851 | window->stateChangeNotify (lastState); | ||
549 | 681 | } | 852 | } |
550 | 682 | 853 | ||
551 | 683 | bool | 854 | bool |
552 | @@ -697,7 +868,10 @@ | |||
553 | 697 | return false; | 868 | return false; |
554 | 698 | 869 | ||
555 | 699 | if (gw->isGridMaximized & !(cw->state () & MAXIMIZE_STATE)) | 870 | if (gw->isGridMaximized & !(cw->state () & MAXIMIZE_STATE)) |
557 | 700 | gw->isGridMaximized = false; | 871 | { |
558 | 872 | gw->window->sizeHints ().flags |= gw->sizeHintsFlags; | ||
559 | 873 | gw->isGridMaximized = false; | ||
560 | 874 | } | ||
561 | 701 | else | 875 | else |
562 | 702 | { | 876 | { |
563 | 703 | if (cw == mGrabWindow) | 877 | if (cw == mGrabWindow) |
564 | @@ -713,6 +887,7 @@ | |||
565 | 713 | xwc.width = gw->originalSize.width (); | 887 | xwc.width = gw->originalSize.width (); |
566 | 714 | xwc.height = gw->originalSize.height (); | 888 | xwc.height = gw->originalSize.height (); |
567 | 715 | cw->maximize (0); | 889 | cw->maximize (0); |
568 | 890 | gw->currentSize = CompRect (); | ||
569 | 716 | cw->configureXWindow (CWX | CWY | CWWidth | CWHeight, &xwc); | 891 | cw->configureXWindow (CWX | CWY | CWWidth | CWHeight, &xwc); |
570 | 717 | gw->pointerBufDx = 0; | 892 | gw->pointerBufDx = 0; |
571 | 718 | gw->pointerBufDy = 0; | 893 | gw->pointerBufDy = 0; |
572 | @@ -818,33 +993,47 @@ | |||
573 | 818 | glScreen (GLScreen::get (screen)), | 993 | glScreen (GLScreen::get (screen)), |
574 | 819 | centerCheck (false), | 994 | centerCheck (false), |
575 | 820 | mGrabWindow (NULL), | 995 | mGrabWindow (NULL), |
577 | 821 | animating (false) | 996 | animating (false), |
578 | 997 | mSwitchingVp (false) | ||
579 | 822 | { | 998 | { |
580 | 999 | o.push_back (CompOption ("window", CompOption::TypeInt)); | ||
581 | 823 | 1000 | ||
582 | 824 | ScreenInterface::setHandler (screen, false); | 1001 | ScreenInterface::setHandler (screen, false); |
583 | 1002 | screen->handleCompizEventSetEnabled (this, true); | ||
584 | 825 | CompositeScreenInterface::setHandler (cScreen, false); | 1003 | CompositeScreenInterface::setHandler (cScreen, false); |
585 | 826 | GLScreenInterface::setHandler (glScreen, false); | 1004 | GLScreenInterface::setHandler (glScreen, false); |
586 | 827 | 1005 | ||
588 | 828 | edge = lastEdge = NoEdge; | 1006 | edge = lastEdge = lastResizeEdge = NoEdge; |
589 | 829 | currentWorkarea = lastWorkarea = screen->getWorkareaForOutput | 1007 | currentWorkarea = lastWorkarea = screen->getWorkareaForOutput |
590 | 830 | (screen->outputDeviceForPoint (pointerX, pointerY)); | 1008 | (screen->outputDeviceForPoint (pointerX, pointerY)); |
591 | 1009 | gridProps[GridUnknown] = GridProps {0,1, 1,1}; | ||
592 | 1010 | gridProps[GridBottomLeft] = GridProps {0,1, 2,2}; | ||
593 | 1011 | gridProps[GridBottom] = GridProps {0,1, 1,2}; | ||
594 | 1012 | gridProps[GridBottomRight] = GridProps {1,1, 2,2}; | ||
595 | 1013 | gridProps[GridLeft] = GridProps {0,0, 2,1}; | ||
596 | 1014 | gridProps[GridCenter] = GridProps{0,0, 1,1}; | ||
597 | 1015 | gridProps[GridRight] = GridProps {1,0, 2,1}; | ||
598 | 1016 | gridProps[GridTopLeft] = GridProps{0,0, 2,2}; | ||
599 | 1017 | gridProps[GridTop] = GridProps {0,0, 1,2}; | ||
600 | 1018 | gridProps[GridTopRight] = GridProps {1,0, 2,2}; | ||
601 | 1019 | gridProps[GridMaximize] = GridProps {0,0, 1,1}; | ||
602 | 831 | 1020 | ||
603 | 832 | animations.clear (); | 1021 | animations.clear (); |
604 | 833 | 1022 | ||
606 | 834 | #define GRIDSET(opt,where,resize) \ | 1023 | #define GRIDSET(opt,where,resize,key) \ |
607 | 835 | optionSet##opt##Initiate (boost::bind (&GridScreen::initiateCommon, this, \ | 1024 | optionSet##opt##Initiate (boost::bind (&GridScreen::initiateCommon, this, \ |
609 | 836 | _1, _2, _3, where, resize)) | 1025 | _1, _2, _3, where, resize, key)) |
610 | 837 | 1026 | ||
621 | 838 | GRIDSET (PutCenterKey, GridCenter, true); | 1027 | GRIDSET (PutCenterKey, GridWindowType::GridCenter, true, true); |
622 | 839 | GRIDSET (PutLeftKey, GridLeft, true); | 1028 | GRIDSET (PutLeftKey, GridWindowType::GridLeft, true, true); |
623 | 840 | GRIDSET (PutRightKey, GridRight, true); | 1029 | GRIDSET (PutRightKey, GridWindowType::GridRight, true, true); |
624 | 841 | GRIDSET (PutTopKey, GridTop, true); | 1030 | GRIDSET (PutTopKey, GridWindowType::GridTop, true, true); |
625 | 842 | GRIDSET (PutBottomKey, GridBottom, true); | 1031 | GRIDSET (PutBottomKey, GridWindowType::GridBottom, true, true); |
626 | 843 | GRIDSET (PutTopleftKey, GridTopLeft, true); | 1032 | GRIDSET (PutTopleftKey, GridWindowType::GridTopLeft, true, true); |
627 | 844 | GRIDSET (PutToprightKey, GridTopRight, true); | 1033 | GRIDSET (PutToprightKey, GridWindowType::GridTopRight, true, true); |
628 | 845 | GRIDSET (PutBottomleftKey, GridBottomLeft, true); | 1034 | GRIDSET (PutBottomleftKey, GridWindowType::GridBottomLeft, true, true); |
629 | 846 | GRIDSET (PutBottomrightKey, GridBottomRight, true); | 1035 | GRIDSET (PutBottomrightKey, GridWindowType::GridBottomRight, true, true); |
630 | 847 | GRIDSET (PutMaximizeKey, GridMaximize, true); | 1036 | GRIDSET (PutMaximizeKey, GridWindowType::GridMaximize, true, true); |
631 | 848 | 1037 | ||
632 | 849 | #undef GRIDSET | 1038 | #undef GRIDSET |
633 | 850 | 1039 | ||
634 | @@ -862,14 +1051,23 @@ | |||
635 | 862 | gScreen (GridScreen::get (screen)), | 1051 | gScreen (GridScreen::get (screen)), |
636 | 863 | isGridResized (false), | 1052 | isGridResized (false), |
637 | 864 | isGridMaximized (false), | 1053 | isGridMaximized (false), |
638 | 1054 | grabMask (0), | ||
639 | 865 | pointerBufDx (0), | 1055 | pointerBufDx (0), |
640 | 866 | pointerBufDy (0), | 1056 | pointerBufDy (0), |
642 | 867 | resizeCount (0), | 1057 | resizeCount (0), |
643 | 868 | lastTarget (GridUnknown) | 1058 | lastTarget (GridUnknown) |
644 | 869 | { | 1059 | { |
645 | 870 | WindowInterface::setHandler (window); | 1060 | WindowInterface::setHandler (window); |
646 | 871 | } | 1061 | } |
647 | 872 | 1062 | ||
648 | 1063 | GridWindow::~GridWindow () | ||
649 | 1064 | { | ||
650 | 1065 | if (gScreen->mGrabWindow == window) | ||
651 | 1066 | gScreen->mGrabWindow = NULL; | ||
652 | 1067 | |||
653 | 1068 | gScreen->o[0].value ().set (0); | ||
654 | 1069 | } | ||
655 | 1070 | |||
656 | 873 | /* Initial plugin init function called. Checks to see if we are ABI | 1071 | /* Initial plugin init function called. Checks to see if we are ABI |
657 | 874 | * compatible with core, otherwise unload */ | 1072 | * compatible with core, otherwise unload */ |
658 | 875 | 1073 | ||
659 | 876 | 1074 | ||
660 | === modified file 'src/grid.h' | |||
661 | --- src/grid.h 2011-09-29 15:54:11 +0000 | |||
662 | +++ src/grid.h 2012-01-18 07:48:23 +0000 | |||
663 | @@ -32,20 +32,22 @@ | |||
664 | 32 | 32 | ||
665 | 33 | #define SNAPOFF_THRESHOLD 50 | 33 | #define SNAPOFF_THRESHOLD 50 |
666 | 34 | 34 | ||
668 | 35 | typedef enum | 35 | namespace GridWindowType |
669 | 36 | { | 36 | { |
682 | 37 | GridUnknown = 0, | 37 | static const unsigned int GridUnknown = (1 << 0); |
683 | 38 | GridBottomLeft = 1, | 38 | static const unsigned int GridBottomLeft = (1 << 1); |
684 | 39 | GridBottom = 2, | 39 | static const unsigned int GridBottom = (1 << 2); |
685 | 40 | GridBottomRight = 3, | 40 | static const unsigned int GridBottomRight = (1 << 3); |
686 | 41 | GridLeft = 4, | 41 | static const unsigned int GridLeft = (1 << 4); |
687 | 42 | GridCenter = 5, | 42 | static const unsigned int GridCenter = (1 << 5); |
688 | 43 | GridRight = 6, | 43 | static const unsigned int GridRight = (1 << 6); |
689 | 44 | GridTopLeft = 7, | 44 | static const unsigned int GridTopLeft = (1 << 7); |
690 | 45 | GridTop = 8, | 45 | static const unsigned int GridTop = (1 << 8); |
691 | 46 | GridTopRight = 9, | 46 | static const unsigned int GridTopRight = (1 << 9); |
692 | 47 | GridMaximize = 10 | 47 | static const unsigned int GridMaximize = (1 << 10); |
693 | 48 | } GridType; | 48 | }; |
694 | 49 | |||
695 | 50 | typedef unsigned int GridType; | ||
696 | 49 | 51 | ||
697 | 50 | typedef struct _GridProps | 52 | typedef struct _GridProps |
698 | 51 | { | 53 | { |
699 | @@ -101,17 +103,18 @@ | |||
700 | 101 | CompRect workarea, currentRect, desiredSlot, lastSlot, | 103 | CompRect workarea, currentRect, desiredSlot, lastSlot, |
701 | 102 | desiredRect, lastWorkarea, currentWorkarea; | 104 | desiredRect, lastWorkarea, currentWorkarea; |
702 | 103 | GridProps props; | 105 | GridProps props; |
704 | 104 | Edges edge, lastEdge; | 106 | Edges edge, lastEdge, lastResizeEdge; |
705 | 105 | CompOption::Vector o; | 107 | CompOption::Vector o; |
706 | 106 | bool centerCheck; | 108 | bool centerCheck; |
707 | 107 | CompWindow *mGrabWindow; | 109 | CompWindow *mGrabWindow; |
708 | 108 | bool animating; | 110 | bool animating; |
709 | 111 | bool mSwitchingVp; | ||
710 | 109 | 112 | ||
711 | 110 | void getPaintRectangle (CompRect&); | 113 | void getPaintRectangle (CompRect&); |
712 | 111 | void setCurrentRect (Animation&); | 114 | void setCurrentRect (Animation&); |
713 | 112 | 115 | ||
714 | 113 | bool initiateCommon (CompAction*, CompAction::State, | 116 | bool initiateCommon (CompAction*, CompAction::State, |
716 | 114 | CompOption::Vector&, GridType, bool); | 117 | CompOption::Vector&, unsigned int, bool, bool); |
717 | 115 | 118 | ||
718 | 116 | void glPaintRectangle (const GLScreenPaintAttrib&, | 119 | void glPaintRectangle (const GLScreenPaintAttrib&, |
719 | 117 | const GLMatrix&, CompOutput *); | 120 | const GLMatrix&, CompOutput *); |
720 | @@ -125,9 +128,11 @@ | |||
721 | 125 | 128 | ||
722 | 126 | std::vector <Animation> animations; | 129 | std::vector <Animation> animations; |
723 | 127 | 130 | ||
725 | 128 | GridType edgeToGridType (); | 131 | int edgeToGridType (); |
726 | 132 | unsigned int typeToMask (int); | ||
727 | 129 | 133 | ||
728 | 130 | void handleEvent (XEvent *event); | 134 | void handleEvent (XEvent *event); |
729 | 135 | void handleCompizEvent (const char *plugin, const char *event, CompOption::Vector &options); | ||
730 | 131 | 136 | ||
731 | 132 | bool restoreWindow (CompAction*, | 137 | bool restoreWindow (CompAction*, |
732 | 133 | CompAction::State, | 138 | CompAction::State, |
733 | @@ -152,22 +157,31 @@ | |||
734 | 152 | public: | 157 | public: |
735 | 153 | 158 | ||
736 | 154 | GridWindow (CompWindow *); | 159 | GridWindow (CompWindow *); |
737 | 160 | ~GridWindow (); | ||
738 | 155 | CompWindow *window; | 161 | CompWindow *window; |
739 | 156 | GridScreen *gScreen; | 162 | GridScreen *gScreen; |
740 | 157 | 163 | ||
741 | 158 | bool isGridResized; | 164 | bool isGridResized; |
742 | 159 | bool isGridMaximized; | 165 | bool isGridMaximized; |
743 | 166 | unsigned int grabMask; | ||
744 | 160 | int pointerBufDx; | 167 | int pointerBufDx; |
745 | 161 | int pointerBufDy; | 168 | int pointerBufDy; |
746 | 162 | int resizeCount; | 169 | int resizeCount; |
747 | 170 | CompRect currentSize; | ||
748 | 163 | CompRect originalSize; | 171 | CompRect originalSize; |
749 | 164 | GridType lastTarget; | 172 | GridType lastTarget; |
750 | 173 | unsigned int sizeHintsFlags; | ||
751 | 165 | 174 | ||
752 | 166 | void grabNotify (int, int, unsigned int, unsigned int); | 175 | void grabNotify (int, int, unsigned int, unsigned int); |
753 | 167 | 176 | ||
754 | 168 | void ungrabNotify (); | 177 | void ungrabNotify (); |
755 | 169 | 178 | ||
756 | 170 | void moveNotify (int, int, bool); | 179 | void moveNotify (int, int, bool); |
757 | 180 | |||
758 | 181 | void stateChangeNotify (unsigned int); | ||
759 | 182 | void validateResizeRequest (unsigned int &valueMask, | ||
760 | 183 | XWindowChanges *xwc, | ||
761 | 184 | unsigned int source); | ||
762 | 171 | }; | 185 | }; |
763 | 172 | 186 | ||
764 | 173 | #define GRID_WINDOW(w) \ | 187 | #define GRID_WINDOW(w) \ |