Re: Full window on workspace change

context for the ML readers:
we were discussing a trick with mapping a special window over the whole
desktop ---- special as in having backtround_pixmap None to inherit pixels
--- in order to hide windows temporarily and avoid undesired exposures, while
shuffling around windows.

GSR - FR <famrom infernal-iceberg com> writes:

> I tried to see how the full window for ws and vp changes could work.
> I declared a window with:
> (setq testw (x-create-window (cons 0 0)
>                              (cons (screen-width) (screen-height))
>                              1))
> Then invoked it and removed it with:
> (progn (x-map-window testw) (x-unmap-window testw))
> Sadly, things flash too much. :[

I have this modification in src/x.c:
DEFUN ("x-create-window", Fx_create_window, Sx_create_window,

+ attributes.save_under = True;
+ attributesMask |= CWSaveUnder;

And I don't see flickering. In fact, I have this command:

(define-command 'xev
    (lambda (w)
      (my-xterm #:program (format #f "xev -id %d" (window-id w))
                #:title  (format #f "xev -id %s" ;fixme! quote
                                 (window-name w))))
    #:spec "%W")

So "H-x xev" invokes  xterm w/ xev  inside for the focused window. I did so for
a gtk+ program "sysprof"
and no exposes were triggered by  mapping & unmapping the testw.

But i don't know, if drawing in between is visible after unmapping, I think that
save-under preserves the snapshot (backing store keeps changes).

I was testing switch-workspace with this trick (now that you provided this simple
implementation :)), and I ended with noticing problems in x-cycle, which
raised groups before switching WS etc. So for now, i made some patches in
x-cycle, to remove the problem i was having w/ undesired exposes.

This trick will be needed when 1 window is on different WS, maybe in different
positions, or probably in the following viewport-changing:

viewport B is active, and i want to change to viewport A:

Stacking is  W1 above W1 above W3 (so W3 is fully obscured).

Since W1 is in both viewports, it needs moving. So either W3 moves before or
after W1 is moved. In both cases it(W3) will be exposed. There is no solution without
the umbrella (testw) window to hide it, i think.

  vieport A        |        viewport B
|+------------------+    +-------+              |
||W1                |    |  W2   |              |
||                  |    +-------+              |
||+---------------+ |                           |
|| W3             | |                           |
||                | |                           |
||                | |                           |
||                  |                           |
|+------------------+                           |

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]