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

Set correct WM_CLASS for the qr-code popup #506

Closed
Spheerys opened this issue Jan 18, 2020 · 6 comments
Closed

Set correct WM_CLASS for the qr-code popup #506

Spheerys opened this issue Jan 18, 2020 · 6 comments

Comments

@Spheerys
Copy link

Hi :)

With the last QtPass version, we get the very usefull feature "QRCode" to show a popup with a flashing code.
However, the windows popup as no WM_CLASS set as you can see with the xprop command :

_NET_WM_DESKTOP(CARDINAL) = 0
_NET_WM_STATE(ATOM) = 
WM_STATE(WM_STATE):
		window state: Normal
		icon window: 0x0
_NET_WM_USER_TIME(CARDINAL) = 77541995
_NET_WM_ICON_NAME(UTF8_STRING) = 
_NET_WM_ICON(CARDINAL) = 
XdndAware(ATOM) = BITMAP
WM_NAME(STRING) =
_NET_WM_NAME(UTF8_STRING) = "QtPass"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x3e, 0x7e, 0x0, 0x0
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0x5c00008
WM_HINTS(WM_HINTS):
		Client accepts input or input focus: True
		window id # of group leader: 0x5c00008
WM_CLIENT_MACHINE(STRING) = "narayan"
_NET_WM_PID(CARDINAL) = 3844489
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 96469023
WM_CLASS(STRING) = "qtpass", "QtPass"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_NORMAL_HINTS(WM_SIZE_HINTS):
		user specified size: 111 by 111
		window gravity: Static

I'm using i3-wm as window manager and I whould set specific action for this popup (be in floating mode to be precise, but it's another topic). But to do this, I have to target this kind of window, and the WM_CLASS whould be very convenient for this stuff :)
A string like "qtpass-qrcode", "QtPass-qrcode" whould be nice :)

@annejan
Copy link
Member

annejan commented Jan 24, 2020

The popup is a QLabel without explicit parent.

I'm looking to see how to set a WM_CLASS on that . .

@annejan
Copy link
Member

annejan commented Jan 24, 2020

I have wrapped the QLabel in a QDialog which is auto-positioned on the icon and behaves like a tool-tip of sorts . .
Screenshot 2020-01-24 at 14 16 07
Hope this helps 😄

@Spheerys
Copy link
Author

Thanks :) I will test this when the new release will be available :)

@annejan annejan closed this as completed Jan 24, 2020
@annejan
Copy link
Member

annejan commented Jan 24, 2020

Should be somewhere next week :)

@Spheerys
Copy link
Author

Spheerys commented Aug 9, 2020

Humm sorry but it's still not working :(

You're QLabel inside QDialog improvement don't permit to filter the popup with the WM_CLASS name.

I have made a small search and for a long time, it was not possible to set it with QT :
lxqt/qterminal#334
akiyosi/goneovim#78

... but it was several years ago....
What about today ?

@kenji21
Copy link
Contributor

kenji21 commented Dec 18, 2020

is it part of version 1.3.2 ? I don't have the qrcode button next to the copy one

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

No branches or pull requests

3 participants