Prevent window minimize by clicking in the tray

We have a requirement to ensure a user can not minimize a window on the Gnome-3 desktop. We have taken the normal minimize buttons away, but the app shows up in the bottom tray. If you click that app in the tray, the window minimizes and another click brings it back to the fore front. Is there a way to manipulate the gnome-3 environment to prevent this?

Hello @seanincolo !

A default GNOME 3 desktop environment has neither a minimize button on windows nor a bottom tray. So what do you use? GNOME classic?

1 Like

Is there a way to manipulate the gnome-3 environment to prevent this?

Not really. You’d have to at least

  • disable the minimize shortcut (Super h by default)
  • write an extension that removes “Hide” from the window menu
  • modify the extension that provides your bottom tray (window-list?)

In case this is for a kiosk-like environment where you control the application that is being run, you may be able to disable minimize on the application-level (via motif WM hints).

Yes, we use the gnome-classic plug in

We have disabled the minimize button in the GUI, but the nature of the desktop is that the window tray at the bottom shows all running apps and clicking on that app will minimize. Very similar to MS Windows where you can click in the bottom window tray and it minimizes/maximizes.

I think I need to create an extension that is based off of The Minimize to tray. I see that he created a WindowListener and I can essentially look for the window with title “XXXX” (using xdotool --search) and then when/if the operator minimizes the GUI, I will just maximize it again. Net effect is that it stays forefront on the kiosk/desktop.

Thoughts?

If you are on X11, you can use something like

$ xprop -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x1, 0x9 0x0 0x0"

to disable minimize for a particular window. Making sure it’s set on every new window is probably easier than undoing minimize events.