I'm not sure if it's i3-related, it only happens (as far as I know) when I use CopyQ.
I have a key-binding for _copyq toggle_.
If CopyQ has a border (e.g. 1pixel) it will move one pixel (or more) to the left and up (diagonally) to the upper left corner of the screen with every evocation of _copyq toggle_
Only way to disable moving is to have something like this in i3 configuration:
for_window [instance="^copyq$" class="^Copyq$"] border pixel 0, floating enable
(this _enables floating_ and _disables borders_ for CopyQ)
What is interesting - if you reverse the order e.g.:
for_window [instance="^copyq$" class="^Copyq$"] floating enable, border pixel 0
(It doesn't work. I think it's border related - but I'm not sure on which side is the problem.)
Again, I'm not sure who should get the blame.
i3 had this problems in the past, but now they're (as far as I know) resolved.
If you need more info, please do tell.
It's probably window manager problem though I do few tricks to open window with correct geometry on current screen plus Qt adds some other tricks too. It's really hard to find window frame size and when window frame changes on X11.
Instead of copyq toggle you can try using
copyq -e 'if (visible()) hide(); else showAt(100, 100)'
where 100, 100 are coordinates for the window (values are in points which depend on DPI).
I'll also post this report in i3 tracker.
(We'll see what comes next.)
@hluk
https://github.com/i3/i3/issues/1780#issuecomment-118171702
I don't think I can do anything about this. I tried to simplify the code (see branch fix_restore_window_geometry) but it doesn't work on Ubuntu (with the default window manager). I'm trying to just to pop up window on current screen on current monitor.
I spent too much time on this already and I should probably just remove all the hacks.
Thanks for the workaround, @aksr. Though I didn't even notice there was a problem until I read this issue and tried for myself :smile:.
I've been using i3 for a bit and fixed some issues.
CopyQ moves one* pixel up and one* left.
Steps to reproduce:
for_window [instance="^copyq$" class="^copyq$"] border pixel 1, floating enable
copyq showcopyq show* (I think it's one, maybe two...)
Window manager can add window border after a window is shown and then decide to move the window (i3 sometimes shifts the window and sometimes not). Maybe Qt fixes the window position after decorated with border. Anyway, I need to use timer to fix the geometry after window is shown. If anyone can explain what is happening or knows better solution I'm all ears.
Actually there seems to be bug in i3 or Qt -- if I just hide and show floating window it always shifts by the border size.
Most helpful comment
I've been using i3 for a bit and fixed some issues.