libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.11k stars 1.82k forks source link

[Feature Request] _NET_WM_PID support #5726

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hello,

Description

There doesn't seem to be any _NET_WM_PID support. This is useful when using signals to hide/show mesa's Gallium HUD.

Expected behavior

_NET_WM_PID is set.

Actual behavior

_NET_WM_PID isn't set. Checked via xprop | grep -iF pid and xdo pid. [What is actually happening]

Steps to reproduce the bug

1) Launch retroarch. 2) xprop | grep -iF pid

Version/Commit

You can find this information under Information/System Information

orbea commented 6 years ago

This is useful when using signals to hide/show mesa's Gallium HUD.

Would you mind explaining how this would be done? :) I am familiar with the Gallium HUD so you can skip the basics.

ghost commented 6 years ago

With the environment variable GALLIUM_HUD_TOGGLE_SIGNAL. Set it to 10 for USR1, for example.

orbea commented 6 years ago

That is pretty handy, thanks!

I also found this. https://manerosss.wordpress.com/2017/07/13/howto-gallium-hud/

orbea commented 6 years ago

I confirmed this works for RetroArch.

For example, RetroArch can be started with.

GALLIUM_HUD_TOGGLE_SIGNAL=10 GALLIUM_HUD=fps ./retroarch

And then this command will toggle the gallium fps HUD.

kill -10 $(pidof retroarch)

However this will only work for people using gallium HUD which is only in mesa with nouveau, amd and the llvmpipe. Intel uses something else and does not have an equivalent function.

ghost commented 6 years ago

I suggest kill -USR1 $(xdo pid), so multiple retroarch instances don't pose any problem. The only thing lacking in gallium HUD is the possibility of displaying a value without a graph, for me.