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

Setting _NET_WM_STRUT and _NET_WM_STRUT_PARTIAL doesn't reserve space #179

Open
RossComputerGuy opened this issue Nov 14, 2018 · 7 comments

Comments

@RossComputerGuy
Copy link
Contributor

I've been spending the last two weeks trying to get RDE Panel to reserve space on the screen, I've tried it in GTK using C and it worked but using Node.JS to do that doesn't work and I've checked my code over a lot.

Lines that set the properties:

@santigimeno
Copy link
Collaborator

What errors do you get?

To debug this, I would recommend using xtrace on the GTK C program and on the nodejs program and check the differences

@RossComputerGuy
Copy link
Contributor Author

I'm getting no errors, I've been setting _NET_WM_STRUT and _NET_WM_STRUT_PARTIAL but the window manager doesn't think of my node.js program as a panel.

@santigimeno
Copy link
Collaborator

Use xprop on the target window in both cases and look for differences.

@RossComputerGuy
Copy link
Contributor Author

GTK:

_OB_APP_TYPE(UTF8_STRING) = "dock"
_OB_APP_TITLE(UTF8_STRING) = "RDE Panel"
_OB_APP_GROUP_CLASS(UTF8_STRING) = "Rde-panel"
_OB_APP_GROUP_NAME(UTF8_STRING) = "rde-panel"
_OB_APP_CLASS(UTF8_STRING) = "rde-panel"
_OB_APP_NAME(UTF8_STRING) = "RDE Panel"
_OB_APP_ROLE(UTF8_STRING) = 
_NET_WM_VISIBLE_ICON_NAME(UTF8_STRING) = "RDE Panel"
_NET_WM_VISIBLE_NAME(UTF8_STRING) = "RDE Panel"
_NET_WM_DESKTOP(CARDINAL) = 4294967295
_NET_WM_STATE(ATOM) = _NET_WM_STATE_SKIP_TASKBAR, _NET_WM_STATE_ABOVE
WM_HINTS(WM_HINTS):
		Client accepts input or input focus: False
		Initial state is Normal State.
		window id # of group leader: 0x4000001
_GTK_THEME_VARIANT(UTF8_STRING) = 
XdndAware(ATOM) = BITMAP
_NET_WM_OPAQUE_REGION(CARDINAL) = 7, 0, 186, 7, 0, 7, 200, 193
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x0, 0x0, 0x0
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 67108869, 67108870
_NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x4000004
WM_CLIENT_LEADER(WINDOW): window id # 0x4000001
_NET_WM_PID(CARDINAL) = 3
WM_LOCALE_NAME(STRING) = "en_US.utf8"
WM_CLIENT_MACHINE(STRING) = "spaceboyross-Latitude-E6420"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
		program specified minimum size: 200 by 200
		program specified maximum size: 200 by 200
		program specified base size: 0 by 0
		window gravity: NorthWest
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_CLASS(STRING) = "RDE Panel", "rde-panel"
WM_ICON_NAME(STRING) = "RDE Panel"
_NET_WM_ICON_NAME(UTF8_STRING) = "RDE Panel"
WM_NAME(STRING) = "RDE Panel"
_NET_WM_NAME(UTF8_STRING) = "RDE Panel"

Node.JS:

_NET_WM_STATE(ATOM) = _NET_WM_STATE_ABOVE
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK
_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 1366
_WIN_STATE(CARDINAL) = 1
_NET_WM_DESKTOP(CARDINAL) = 4294967295
_OB_APP_ROLE(UTF8_STRING) = "panel"
_OB_APP_NAME(UTF8_STRING) = "RDE Panel"
_OB_APP_CLASS(UTF8_STRING) = "rde-panel"
_OB_APP_GROUP_NAME(UTF8_STRING) = "rde-panel"
_OB_APP_GROUP_CLASS(UTF8_STRING) = "RDE-Panel"
_OB_APP_TYPE(UTF8_STRING) = "dock"
_OB_APP_TITLE(UTF8_STRING) = "RDE Panel"
_NET_WM_STRUT(CARDINAL) = 0, 0, 0, 23
_NET_WM_PID(CARDINAL) = 16256
WM_CLIENT_MACHINE(STRING) = "spaceboyross-Latitude-E6420"
WM_CLASS(STRING) = "panel", "rde-panel"
WM_NAME(STRING) = "RDE Panel"

@santigimeno
Copy link
Collaborator

🤷‍♂️ you'll have to investigate which property/ies you have to set to make it work.

@RossComputerGuy
Copy link
Contributor Author

It's setting _NET_WM_STRUT and _NET_WM_STRUT_PARTIAL that must be set.

@ktiedt
Copy link

ktiedt commented Dec 23, 2021

@RossComputerGuy I don't suppose you ever found a solution to this? This is literally the last feature for one of our apps to keep all the code in NodeJS vs NodeJS + Python to implement.

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

No branches or pull requests

3 participants