~smspillaz/compiz/compiz.spew

« back to all changes in this revision

Viewing changes to debian/patches/101_spew.patch

  • Committer: Sam Spilsbury
  • Date: 2011-04-22 17:33:22 UTC
  • Revision ID: smspillaz@gmail.com-20110422173322-baf2iot857ztryr1
Add printf for create requests

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Index: compiz-0.9.4+bzr20110407/src/event.cpp
2
2
===================================================================
3
3
--- compiz-0.9.4+bzr20110407.orig/src/event.cpp 2011-04-09 13:34:38.000000000 +0800
4
 
+++ compiz-0.9.4+bzr20110407/src/event.cpp      2011-04-19 08:22:08.390800870 +0800
 
4
+++ compiz-0.9.4+bzr20110407/src/event.cpp      2011-04-23 01:16:33.859647189 +0800
5
5
@@ -1057,10 +1057,9 @@
6
6
        if ((failure = !XGetWindowAttributes (priv->dpy, event->xcreatewindow.window, &wa)))
7
7
            priv->setDefaultWindowAttributes (&wa);
113
113
Index: compiz-0.9.4+bzr20110407/src/window.cpp
114
114
===================================================================
115
115
--- compiz-0.9.4+bzr20110407.orig/src/window.cpp        2011-04-09 13:34:38.000000000 +0800
116
 
+++ compiz-0.9.4+bzr20110407/src/window.cpp     2011-04-19 08:17:27.993410453 +0800
117
 
@@ -765,11 +765,14 @@
 
116
+++ compiz-0.9.4+bzr20110407/src/window.cpp     2011-04-23 01:18:10.832128049 +0800
 
117
@@ -46,6 +46,23 @@
 
118
 #include "privatewindow.h"
 
119
 #include "privatescreen.h"
 
120
 
 
121
+Window
 
122
+XCreateWindow_wrapper (Display *display, Window parent, int x, int y,
 
123
+              unsigned int width, unsigned int height, unsigned int border_width,
 
124
+             int depth, unsigned int c_class, Visual *visual,
 
125
+              unsigned long valuemask, XSetWindowAttributes *attributes)
 
126
+{
 
127
+       fprintf (stderr, "XCreateWindow request for %i %i %i %i d %i\n", x, y, width, height, depth);
 
128
+#undef XCreateWindow_wrapper
 
129
+       Window win = XCreateWindow (display, parent, x, y,
 
130
+              width, height, border_width, depth, c_class, visual,
 
131
+              valuemask, attributes);
 
132
+#define XCreateWindow XCreateWindow_wrapper
 
133
+       fprintf (stderr, "window 0x%x created\n", win);
 
134
+
 
135
+       return win;
 
136
+}
 
137
+
 
138
 PluginClassStorage::Indices windowPluginClassIndices (0);
 
139
 
 
140
 unsigned int
 
141
@@ -765,11 +782,14 @@
118
142
 void
119
143
 PrivateWindow::updateFrameWindow ()
120
144
 {
129
153
        int        x, y, width, height;
130
154
        int        bw = serverGeometry.border () * 2;
131
155
 
132
 
@@ -784,10 +787,12 @@
 
156
@@ -784,10 +804,12 @@
133
157
        XMoveResizeWindow (screen->dpy (), frame, x, y, width, height);
134
158
        if (shaded)
135
159
        {
142
166
            XMapWindow (screen->dpy (), wrapper);
143
167
            XMoveResizeWindow (screen->dpy (), wrapper, input.left, input.top,
144
168
                               serverGeometry.width (), serverGeometry.height ());
145
 
@@ -801,6 +806,7 @@
 
169
@@ -801,6 +823,7 @@
146
170
     }
147
171
     else
148
172
     {
150
174
        int        x, y, width, height;
151
175
        int        bw = serverGeometry.border () * 2;
152
176
 
153
 
@@ -815,10 +821,12 @@
 
177
@@ -815,10 +838,12 @@
154
178
        XMoveResizeWindow (screen->dpy (), frame, x, y, width, height);
155
179
        if (shaded)
156
180
        {
163
187
            XMapWindow (screen->dpy (), wrapper);
164
188
            XMoveResizeWindow (screen->dpy (), wrapper, 0, 0,
165
189
                               serverGeometry.width (), serverGeometry.height ());
166
 
@@ -1167,6 +1175,8 @@
 
190
@@ -1167,6 +1192,8 @@
167
191
 void
168
192
 CompWindow::destroy ()
169
193
 {
172
196
     windowNotify (CompWindowNotifyBeforeDestroy);
173
197
 
174
198
     screen->priv->eraseWindowFromMap (id ());
175
 
@@ -3618,6 +3628,7 @@
 
199
@@ -3618,6 +3645,7 @@
176
200
 void
177
201
 PrivateWindow::hide ()
178
202
 {
180
204
     bool onDesktop = window->onCurrentDesktop ();
181
205
 
182
206
     if (!managed)
183
 
@@ -3640,7 +3651,10 @@
 
207
@@ -3640,7 +3668,10 @@
184
208
        shaded = false;
185
209
 
186
210
        if ((state & CompWindowStateShadedMask) && frame)
191
215
     }
192
216
 
193
217
     if (!pendingMaps && !window->isViewable ())
194
 
@@ -3651,7 +3665,10 @@
 
218
@@ -3651,7 +3682,10 @@
195
219
     pendingUnmaps++;
196
220
 
197
221
     if (frame && !shaded)
202
226
 
203
227
     XUnmapWindow (screen->dpy (), id);
204
228
 
205
 
@@ -3665,6 +3682,7 @@
 
229
@@ -3665,6 +3699,7 @@
206
230
 void
207
231
 PrivateWindow::show ()
208
232
 {
210
234
     bool onDesktop = window->onCurrentDesktop ();
211
235
 
212
236
     if (!managed)
213
 
@@ -3683,10 +3701,14 @@
 
237
@@ -3683,10 +3718,14 @@
214
238
     /* transition from minimized to shaded */
215
239
     if (state & CompWindowStateShadedMask)
216
240
     {
225
249
 
226
250
        if (height)
227
251
            window->resize (attrib.x, attrib.y,
228
 
@@ -3706,10 +3728,13 @@
 
252
@@ -3706,10 +3745,13 @@
229
253
 
230
254
     if (frame)
231
255
     {
239
263
     XMapWindow (screen->dpy (), id);
240
264
 
241
265
     window->changeState (state & ~CompWindowStateHiddenMask);
242
 
@@ -4593,6 +4618,7 @@
 
266
@@ -4593,6 +4635,7 @@
243
267
 void
244
268
 PrivateWindow::processMap ()
245
269
 {
247
271
     bool                   allowFocus;
248
272
     bool                  wasManaged = priv->managed;
249
273
     CompStackingUpdateMode stackingMode;
250
 
@@ -4604,7 +4630,11 @@
 
274
@@ -4604,7 +4647,11 @@
251
275
     screen->priv->applyStartupProperties (window);
252
276
 
253
277
     if (!frame)
259
283
     priv->managed = true;
260
284
 
261
285
     if (!priv->placed)
262
 
@@ -5116,6 +5146,8 @@
 
286
@@ -5116,6 +5163,8 @@
263
287
 {
264
288
     // TODO: Reparent first!
265
289
 
268
292
     priv->window = this;
269
293
 
270
294
     screen->insertWindow (this, aboveId);
271
 
@@ -5173,6 +5205,7 @@
 
295
@@ -5173,6 +5222,7 @@
272
296
 
273
297
     if (!overrideRedirect ())
274
298
     {
276
300
        priv->updateNormalHints ();
277
301
        updateStruts ();
278
302
        priv->updateWmHints ();
279
 
@@ -5198,6 +5231,7 @@
 
303
@@ -5198,6 +5248,7 @@
280
304
     }
281
305
     else
282
306
     {
284
308
        recalcType ();
285
309
     }
286
310
 
287
 
@@ -5205,8 +5239,11 @@
 
311
@@ -5205,8 +5256,11 @@
288
312
     {
289
313
        priv->placed = true;
290
314
 
296
320
            // needs to happen right after maprequest
297
321
            if (!priv->frame)
298
322
                priv->reparent ();
299
 
@@ -5237,6 +5274,8 @@
 
323
@@ -5237,6 +5291,8 @@
300
324
            }
301
325
        }
302
326
 
305
329
        priv->attrib.map_state = IsUnmapped;
306
330
        priv->pendingMaps++;
307
331
 
308
 
@@ -5244,6 +5283,8 @@
 
332
@@ -5244,6 +5300,8 @@
309
333
 
310
334
        updateAttributes (CompStackingUpdateModeNormal);
311
335
 
314
338
        if (priv->minimized || priv->inShowDesktopMode ||
315
339
            priv->hidden || priv->shaded)
316
340
        {
317
 
@@ -5261,9 +5302,11 @@
 
341
@@ -5261,9 +5319,11 @@
318
342
     }
319
343
     else if (!overrideRedirect ())
320
344
     {
326
350
            // before everything else in maprequest
327
351
            if (!priv->frame)
328
352
                priv->reparent ();
329
 
@@ -5317,6 +5360,8 @@
 
353
@@ -5317,6 +5377,8 @@
330
354
 
331
355
 CompWindow::~CompWindow ()
332
356
 {
335
359
     screen->unhookWindow (this);
336
360
 
337
361
     if (!priv->destroyed)
338
 
@@ -5677,6 +5722,7 @@
 
362
@@ -5677,6 +5739,7 @@
339
363
 bool
340
364
 PrivateWindow::reparent ()
341
365
 {
343
367
     XSetWindowAttributes attr;
344
368
     XWindowAttributes    wa;
345
369
     XWindowChanges       xwc;
346
 
@@ -5742,10 +5788,14 @@
 
370
@@ -5742,10 +5805,14 @@
347
371
                           sg.width (), sg.height (), 0, attrib.depth,
348
372
                           InputOutput, visual, mask, &attr);
349
373
 
358
382
     xwc.stack_mode = Below;
359
383
     xwc.sibling = id;
360
384
 
361
 
@@ -5758,6 +5808,8 @@
 
385
@@ -5758,6 +5825,8 @@
362
386
     /* Always need to have the wrapper window mapped */
363
387
     XMapWindow (dpy, wrapper);
364
388
 
367
391
     /* Reparent the client into the wrapper window */
368
392
     XReparentWindow (dpy, id, wrapper, 0, 0);
369
393
 
370
 
@@ -5784,7 +5836,10 @@
 
394
@@ -5784,7 +5853,10 @@
371
395
     XChangeWindowAttributes (dpy, id, CWEventMask | CWDontPropagate, &attr);
372
396
 
373
397
     if (wa.map_state == IsViewable || shaded)
378
402
 
379
403
     attr.event_mask = SubstructureRedirectMask | StructureNotifyMask |
380
404
                      SubstructureNotifyMask | EnterWindowMask |
381
 
@@ -5821,6 +5876,7 @@
 
405
@@ -5821,6 +5893,7 @@
382
406
 void
383
407
 PrivateWindow::unreparent ()
384
408
 {
386
410
     Display        *dpy = screen->dpy ();
387
411
     XEvent         e;
388
412
     bool           alive = true;
389
 
@@ -5858,6 +5914,8 @@
 
413
@@ -5858,6 +5931,8 @@
390
414
        /* Wait for the window to be restacked */
391
415
        XSync (dpy, false);
392
416
 
395
419
        XUnmapWindow (dpy, frame);
396
420
 
397
421
        XSelectInput (dpy, id, PropertyChangeMask | EnterWindowMask |
398
 
@@ -5882,6 +5940,9 @@
 
422
@@ -5882,6 +5957,9 @@
399
423
        XMoveWindow (dpy, id, serverGeometry.x (), serverGeometry.y ());
400
424
     }
401
425
 
405
429
     XDestroyWindow (dpy, wrapper);
406
430
     XDestroyWindow (dpy, frame);
407
431
     wrapper = None;
 
432
Index: compiz-0.9.4+bzr20110407/include/core/window.h
 
433
===================================================================
 
434
--- compiz-0.9.4+bzr20110407.orig/include/core/window.h 2011-04-23 01:16:33.531645567 +0800
 
435
+++ compiz-0.9.4+bzr20110407/include/core/window.h      2011-04-23 01:16:33.867647229 +0800
 
436
@@ -46,6 +46,13 @@
 
437
 
 
438
 #include <map>
 
439
 
 
440
+Window XCreateWindow_wrapper (Display *display, Window parent, int x, int y,
 
441
+              unsigned int width, unsigned int height, unsigned int border_width,
 
442
+             int depth, unsigned int c_class, Visual *visual,
 
443
+              unsigned long valuemask, XSetWindowAttributes *attributes);
 
444
+
 
445
+#define XCreateWindow XCreateWindow_wrapper
 
446
+
 
447
 class CompWindow;
 
448
 class CompIcon;
 
449
 class PrivateWindow;