scratchpad: fix moving scratchpad window

From the source:

    When starting i3 initially (and after each change to the connected
    outputs), this function fixes the resolution of the __i3
    pseudo-output. When that resolution is not set to a function which
    shares a common divisor with every active output’s resolution,
    floating point calculation errors will lead to the scratchpad window
    moving when shown repeatedly.

fixes #632
This commit is contained in:
Michael Stapelberg
2012-08-08 16:22:03 +02:00
parent 3cdc5c5369
commit 6ba0944430
6 changed files with 158 additions and 1 deletions

View File

@ -30,7 +30,9 @@ static Con *_create___i3(void) {
x_set_name(__i3, "[i3 con] pseudo-output __i3");
/* For retaining the correct position/size of a scratchpad window, the
* dimensions of the real outputs should be multiples of the __i3
* pseudo-output. */
* pseudo-output. Ensuring that is the job of scratchpad_fix_resolution()
* which gets called after this function and after detecting all the
* outputs (or whenever an output changes). */
__i3->rect.width = 1280;
__i3->rect.height = 1024;