Copyq: Issue with i3 tiling WM

Created on 1 Jul 2015  路  9Comments  路  Source: hluk/CopyQ

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.

Most helpful comment

I've been using i3 for a bit and fixed some issues.

  • There is now option to hide window when closed (if tray is not available) -- option "Hide main window" under "Layout" config tab.
  • Pasting from tray menu should work.
  • I haven't noticed any issues with window geometry though (perhaps fixed with some other recent commits).

All 9 comments

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.)

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.

  • There is now option to hide window when closed (if tray is not available) -- option "Hide main window" under "Layout" config tab.
  • Pasting from tray menu should work.
  • I haven't noticed any issues with window geometry though (perhaps fixed with some other recent commits).

CopyQ moves one* pixel up and one* left.

Steps to reproduce:

  1. Have this in i3 config:

for_window [instance="^copyq$" class="^copyq$"] border pixel 1, floating enable

  1. Execute copyq show
  2. Execute i3 command: move position center
  3. Multiple times execute copyq show
    (Window will move one* pixel up and one* left (at the same time)).
    (It will stay that way...)

* (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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

orschiro picture orschiro  路  7Comments

reagle picture reagle  路  4Comments

davidawad picture davidawad  路  9Comments

hluk picture hluk  路  9Comments

lepalmtree picture lepalmtree  路  7Comments