Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-09-17 03:08:25

GaryAitken
Member
Registered: 2012-05-29
Posts: 15

How to get window to show up in cycle list

Running 4.16 on fbsd.  I run xmbmon to display hardware status (cpu temps, etc).  I normally want it on top, but I don't want to set it to always on top because sometimes I need to see what's in that corner.  I would like it to show up in the windows-to-be-cycled-through set, but it is not there for some reason.  Is there a way to make it show up there?  Its title shows as "xmbmon".

xmbmon appears to be in a small set of apps that don't show up in the list; what determines whether something shows up or not?  E.g. xclock also is not in that list, but they both show up in the drop-down for not-so-recently-used windows at the right of the main panel.

Offline

#2 2022-09-17 12:12:41

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: How to get window to show up in cycle list

As I understand it, the ICCCM allows for WM_HINTS to be passed to the window manager to provide some additional information regarding its behaviour. If not provided, the Window Manager can use its own defaults. Of these, Input Focus specifies whether the client receives any sort of input (example for xclock):

$ xprop WM_PROTOCOLS WM_HINTS
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW
WM_HINTS(WM_HINTS):
		Client accepts input or input focus: False
		Initial state is Normal State.
		bitmap id # to use for icon: 0x4400001
		bitmap id # of mask for icon: 0x4400003

Where it is set to false, the window manager, when honoring ICCCM, will remove this client from the stacking list.

Therfore, if you uncheck Settings Manager > Window Manger Tweaks > Focus > "Honor standard ICCCM focus hint", it should show up in the alt+tab dialog (tested with xclock).


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2022-09-17 14:37:06

GaryAitken
Member
Registered: 2012-05-29
Posts: 15

Re: How to get window to show up in cycle list

Thanks.  Is there a way to specify this behavior for only one window?

Offline

#4 2022-09-17 14:42:52

GaryAitken
Member
Registered: 2012-05-29
Posts: 15

Re: How to get window to show up in cycle list

oops, I see it can probably be done with xprop; will have to dig into that more.

Offline

#5 2022-09-17 15:53:18

Jordi
Member
Registered: 2022-09-12
Posts: 6

Re: How to get window to show up in cycle list

Not the right way to do it, but setting the window "modal" make it show up in cycle list. This works with xclock:

wmctrl -r xclock -b add,modal

Offline

#6 2022-09-17 23:50:56

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: How to get window to show up in cycle list

You should be able to use xprop to set WM_HINTS, something like:

xprop -id 0x440000a -f WM_HINTS 32i -set WM_HINTS 1,1,0,0,0,0,0,0,0

...but I can't seem to figure out the secret combination.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2022-09-18 17:40:19

GaryAitken
Member
Registered: 2012-05-29
Posts: 15

Re: How to get window to show up in cycle list

Thanks!
When I do xprop -name xmbmon WM_HINTS I see:
WM_HINTS(INTEGER):
                Client accepts input or input focus: True
                Initial state is Normal State.
So to preserve the initial state (probably shouldn't matter since it's already launched), I think the magic incantation is:
  xprop -name xmbmon -f WM_HINTS 32i -set WM_HINTS 3,1,1,0,0,0,0,0,0
The 3 to define which fields are defined, in this case Input focus = true and initial state = normal.

It seems to work, in the sense that it changes the hint; with appropriate combinations such as 1,1...  3,0,1... 3,1,0...

But it doesn't seem to work, in the sense that xfce doesn't change its behavior; if I leave the input focus hint on and tell xfce to honor ICCCM focus hints, the window still doesn't show up in the alt-tab context switch.  Maybe xfce is only looking at the WM_HINTS property when it initially displays the window, so changing it has no affect, and I can't set it pre-launch.  Removing and resetting doesn't fix it either.  I guess that could be considered either a bug or a feature.

I don't understand the 32i, since there are 9 different fields.  Are they all 32 bit, even the input focus which is a bool?  I think the answer is yes, but I haven't programmed X for decades.  I tried using 0i; the doc says " Zero is a special case meaning use the field size information associated with the property itself." but that gives me an error:
    ~$ xprop -name xmbmon -f WM_HINTS 0i -set WM_HINTS 3,1,1,0,0,0,0,0,0
    X Error of failed request:  BadValue (integer parameter out of range for operation)
      Major opcode of failed request:  18 (X_ChangeProperty)
      Value in failed request:  0x0
8i and 16i pretend to work, but displaying the property shows a size mismatch.

Offline

#8 2022-09-18 19:41:47

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,950

Re: How to get window to show up in cycle list

You could post a question/bug report in the xfwm4 bug tracker. The developer is quite active there and should respond.

Edit:  Success! If unmap and remap the xclock window it then shows up in the alt-tab cycle:

xprop -name xclock -f WM_HINTS 32i -set WM_HINTS 3,1,1,0,0,0,0,0,0
xdotool search xclock windowunmap
xdotool search xclock windowmap

Edit2: but it loses its icon. So we call in yet another utility:

xseticon -name xclock /usr/share/icons/elementary-xfce/apps/32/clock.png

Last edited by ToZ (2022-09-18 19:49:51)


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#9 2022-09-19 04:02:00

GaryAitken
Member
Registered: 2012-05-29
Posts: 15

Re: How to get window to show up in cycle list

Offline

#10 2022-09-19 17:27:09

GaryAitken
Member
Registered: 2012-05-29
Posts: 15

Re: How to get window to show up in cycle list

A simple work-around is to start the app and set WM_HINTS before starting xfce:

/usr/local/bin/xmbmon -name xmbmon -tmin 20 -tmax 140 -tick 5 -vmin 3.5 -vmax 4.0 -cltcs magenta -geom =600x200-0-0 &
sleep 1
xprop -name xmbmon -f WM_HINTS 32i -set WM_HINTS 3,1,1,0,0,0,0,0,0

I don't know if the sleep is really needed or not, but it gives time for the window to exist.

Offline

Board footer

Powered by FluxBB