CopyQ icon indicating copy to clipboard operation
CopyQ copied to clipboard

"Show main window under mouse cursor" doesn't show the main window at the current mouse pointer position when executed the first time

Open puchu opened this issue 3 years ago • 13 comments

Describe the bug when using the shortcut "Show main window under mouse cursor" to place copyq at the current mouse pointer position, copyq opens at a random point, pressing the shortcut a second time, puts copyq at the current mouse pointer position

To Reproduce Steps to reproduce the behavior:

  1. execute "Show main window under mouse cursor"
  2. main window opens at a random point
  3. pressing the shortcut a second time, opens the main window at the current mouse pointer position

Expected behavior the main window opens at the current mouse pointer position

Version, OS and Environment CopyQ Clipboard Manager 6.1.0 Qt: 5.15.2 KNotifications: 5.92.0 Compiler: GCC Arch: x86_64-little_endian-lp64

puchu avatar May 09 '22 11:05 puchu

I assume this happens under Wayland which does not support custom window positioning and getting mouse pointer position.

hluk avatar May 15 '22 05:05 hluk

No, this happens under X11

puchu avatar May 15 '22 08:05 puchu

What's you window manager? I briefly tested this in openbox without seeing any issue.

hluk avatar May 15 '22 08:05 hluk

kde

puchu avatar May 15 '22 18:05 puchu

it doesnt work when i do this:

  • open one app
  • left click inside the app (active it as active window)
  • move the mouse somewhere else one the screen
  • press the defined copyq shortcut to show it below the mouse pointer
  • window is opened somewhere (not below the mouse pointer)
  • press the shortcut again - now it's below the mouse pointer

puchu avatar May 15 '22 18:05 puchu

It could be related to some problems with window geometry and multiple screens - which is fixed but not yet released.

hluk avatar May 16 '22 11:05 hluk

which commit fixes the bug? i can backport it and try it

puchu avatar May 16 '22 11:05 puchu

Commits 3bd6f29, 0774563 and b0dd430. Easier if you try building from latest master.

hluk avatar May 16 '22 12:05 hluk

i applied the patches and it doesnt fix the bug

puchu avatar May 16 '22 12:05 puchu

I've tested this in Xnest session and it looks like kwin itself restores the window position after it is shown again.

hluk avatar May 16 '22 15:05 hluk

I have no idea how to move the window without adding ugly timers that would reset the position after an interval (this has been the previous implementation but it did not work well on various window managers).

hluk avatar May 16 '22 16:05 hluk

I have the same issue. On Ubuntu: Version 6.1.0 (flatpak) doesn't position the window under the cursor, but version 3.10.0-1 (deb) that is in ubuntu repo works properly. On Pop!_OS: Version 6.0.1 (deb) also doesn't work properly.

CristianKerr avatar May 18 '22 09:05 CristianKerr

Same issue,

~$ copyq -v
CopyQ Clipboard Manager 6.1.0
Qt: 5.15.2
KNotifications: 5.78.0
Compiler: GCC
Arch: x86_64-little_endian-lp64
OS: Debian GNU/Linux 11 (bullseye)

koorya avatar Jul 19 '22 07:07 koorya

fixed in the lastest version

puchu avatar Oct 04 '22 09:10 puchu