Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/click through #131

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mortoray
Copy link

@mortoray mortoray commented Aug 1, 2018

adds --click-through to pass mouse input through the window
adds --keep-above to move window to top of others

@phillipberndt
Copy link
Owner

Thanks! As mentioned in the other thread, I'm not overly eager to add any X11-specifc features to pqiv, but I'll leave this PR open for others to find.

@hyperdoxical
Copy link

This is exactly what I wanted!

@Heath123
Copy link

It gives me this error:

/usr/bin/ld: pqiv.o: in function `window_configure_callback':
/home/heath/pqiv/pqiv.c:6641: undefined reference to `gdk_x11_window_get_xid'
collect2: error: ld returned 1 exit status
make: *** [GNUmakefile:170: pqiv] Error 1

@mortoray
Copy link
Author

Try installing the x11 or gdk dev libraries (libgtk-dev perhaps). I'm not clear on which one it was, since I have so many installed on my machine.

@Heath123
Copy link

Installing libgtk-3-dev didn't work

@Heath123
Copy link

Do you have binaries maybe?

@mortoray
Copy link
Author

I do have the binary I use. I used ldd on it and it lists these libraries:

linux-vdso.so.1 (0x00007fff09383000)
libgtk-3.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 (0x00007fa5a4202000)
libgdk-3.so.0 => /usr/lib/x86_64-linux-gnu/libgdk-3.so.0 (0x00007fa5a3f0c000)
libcairo.so.2 => /usr/lib/x86_64-linux-gnu/libcairo.so.2 (0x00007fa5a3bef000)
libgio-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007fa5a3850000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fa5a3518000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fa5a3306000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007fa5a30e2000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fa5a2e8e000)
libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fa5a2b77000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa5a27d9000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa5a23e8000)
libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007fa5a21e4000)
libpangocairo-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007fa5a1fd7000)
libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007fa5a1dc7000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007fa5a1bc1000)
libcairo-gobject.so.2 => /usr/lib/x86_64-linux-gnu/libcairo-gobject.so.2 (0x00007fa5a19b8000)
libatk-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007fa5a1792000)
libatk-bridge-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0 (0x00007fa5a1561000)
libepoxy.so.0 => /usr/lib/x86_64-linux-gnu/libepoxy.so.0 (0x00007fa5a1260000)
libpangoft2-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007fa5a104a000)
libpango-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007fa5a0dfd000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007fa5a0bb8000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa5a0999000)
libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007fa5a0796000)
libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007fa5a058b000)
libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007fa5a0381000)
libXcomposite.so.1 => /usr/lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007fa5a017e000)
libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007fa59ff7b000)
libxkbcommon.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007fa59fd3c000)
libwayland-cursor.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-cursor.so.0 (0x00007fa59fb34000)
libwayland-egl.so.1 => /usr/lib/x86_64-linux-gnu/libwayland-egl.so.1 (0x00007fa59f932000)
libwayland-client.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007fa59f723000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fa59f51b000)
libpixman-1.so.0 => /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007fa59f276000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fa59efc2000)
libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007fa59ed90000)
libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007fa59eb8d000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fa59e965000)
libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007fa59e758000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007fa59e54e000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fa59e331000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007fa59e109000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fa59deee000)
libmount.so.1 => /lib/x86_64-linux-gnu/libmount.so.1 (0x00007fa59dc9a000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa59da96000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007fa59d88e000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fa59d61c000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa5a4d33000)
libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007fa59d3cf000)
libatspi.so.0 => /usr/lib/x86_64-linux-gnu/libatspi.so.0 (0x00007fa59d19f000)
libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007fa59cf01000)
libthai.so.0 => /usr/lib/x86_64-linux-gnu/libthai.so.0 (0x00007fa59ccf8000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fa59cac6000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fa59c8c2000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fa59c6bc000)
libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x00007fa59c46f000)
libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007fa59c1eb000)
libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007fa59bfbe000)
libdatrie.so.1 => /usr/lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007fa59bdb7000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fa59bba2000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fa59b99b000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fa59b775000)
liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007fa59b559000)
libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007fa59b23d000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007fa59b028000)

@Heath123
Copy link

OK, mine seems to be using GTK2 instead of GTK3

@Heath123
Copy link

Forcing GTK3 seems to have fixed it

@Heath123
Copy link

Heath123 commented Oct 23, 2020

Yay, it works, thanks for the help (I realised the GTK version was different from the libraries). I had to do ./configure --gtk-version=3

RaitaroH added a commit to RaitaroH/Random-Code that referenced this pull request Jul 4, 2021
@Hello1024
Copy link

Hello1024 commented Aug 5, 2021

This branch has no support for Wayland. Neither the click through nor the keep above features seem to work correctly.

(pqiv:374267): Gdk-WARNING **: 16:45:06.250: ../../../../../gdk/x11/gdkwindow-x11.c:5650 drawable is not a native X11 window
Segmentation fault (core dumped)

It can be worked around by setting an environment variable like this:

GDK_BACKEND=x11 pqiv --click-through --transparent-background --hide-info-box --keep-above  alphatest.png 

Although then the click-through support behaves... oddly... Sometimes a click will go through multiple windows and end up clicking some background window. I suspect it's some XWayland bug.

@parkerlreed
Copy link

parkerlreed commented Jan 3, 2024

Tried this out but unfortunately seems to fail compiling at the libav step.

(2)(deck@dev-arch pqiv)$ make 
 CC   backends/libav.o
/home/deck/build/pqiv/backends/libav.c: In function ‘file_type_libav_load’:
/home/deck/build/pqiv/backends/libav.c:250:26: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  250 |         AVCodec *codec = avcodec_find_decoder(private->avcontext->streams[private->video_stream_id]->codecpar->codec_id);
      |                          ^~~~~~~~~~~~~~~~~~~~
/home/deck/build/pqiv/backends/libav.c: In function ‘file_type_libav_initializer’:
/home/deck/build/pqiv/backends/libav.c:407:5: warning: implicit declaration of function ‘avcodec_register_all’ [-Wimplicit-function-declaration]
  407 |     avcodec_register_all();
      |     ^~~~~~~~~~~~~~~~~~~~
/home/deck/build/pqiv/backends/libav.c:408:9: warning: implicit declaration of function ‘av_register_all’ [-Wimplicit-function-declaration]
  408 |         av_register_all();
      |         ^~~~~~~~~~~~~~~
/home/deck/build/pqiv/backends/libav.c:413:35: warning: implicit declaration of function ‘av_iformat_next’ [-Wimplicit-function-declaration]
  413 |         for(AVInputFormat *iter = av_iformat_next(NULL); iter; iter = av_iformat_next(iter)) {
      |                                   ^~~~~~~~~~~~~~~
/home/deck/build/pqiv/backends/libav.c:413:35: warning: initialization of ‘AVInputFormat *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
/home/deck/build/pqiv/backends/libav.c:413:9: error: declaration of non-variable ‘av_iformat_next’ in ‘for’ loop initial declaration
  413 |         for(AVInputFormat *iter = av_iformat_next(NULL); iter; iter = av_iformat_next(iter)) {
      |         ^~~
/home/deck/build/pqiv/backends/libav.c:413:69: warning: assignment to ‘AVInputFormat *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  413 |         for(AVInputFormat *iter = av_iformat_next(NULL); iter; iter = av_iformat_next(iter)) {
      |                                                                     ^
make: *** [GNUmakefile:182: backends/libav.o] Error 1

@parkerlreed
Copy link

Got this working by ignoring libav!

./configure --without-libav

Screenshot_20240103_172353

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants