Minimize option is broken or non-existant

Bug #260875 reported by Azelphur
60
This bug affects 11 people
Affects Status Importance Assigned to Milestone
wmctrl (Ubuntu)
Confirmed
Undecided
Anton

Bug Description

Binary package hint: wmctrl

The about and help for wmctrl says it can support minimizing windows, however there doesn't appear to be an option for it!

I tried hidden, but this appears to have no effect.

Changed in wmctrl:
status: New → Confirmed
Revision history for this message
Michael B. Trausch (mtrausch) wrote : Invalid (with rationale)

  status invalid
  done

The hidden option asks the window manager to toggle the
_NET_WM_STATE_HIDDEN attribute of a window, however the Extended
Window Manager Hints specification from freedesktop.org states:

  _NET_WM_STATE_HIDDEN should be set by the Window Manager to indicate
  that a window would not be visible on the screen if its
  desktop/viewport were active and its coordinates were within the
  screen bounds. The canonical example is that minimized windows should
  be in the _NET_WM_STATE_HIDDEN state. Pagers and similar applications
  should use _NET_WM_STATE_HIDDEN instead of WM_STATE to decide whether
  to display a window in miniature representations of the windows on a
  desktop.

  Implementation note: if an Application asks to toggle
  _NET_WM_STATE_HIDDEN the Window Manager should probably just ignore
  the request, since _NET_WM_STATE_HIDDEN is a function of some other
  aspect of the window such as minimization, rather than an independent
  state.

Keep in mind that the property that you submit with -r / -b sends a
request to the window manager to change the _NET_WM_STATE_<property>
property of the window. This is an arbitrary property, presumably so
that it continues to work when the specifications change or are
extended. There is no option in the specification to request
minimization of the window, which means that it is outside of wmctrl's
ability to control it; for additional information, refer to the
Extended Window Manager Hints specification, Applicatoin Windows
Properties, _NET_WM_STATE:

  http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html#id2507241

The mention of minimization on the -h states that it is an example of
an action that a window manager may permit. Should the EWMH standard
be extended to include a _NET_WM_STATE_MINIMIZED or something similar,
it will be controllable from wmctrl; until then, a lower-level,
possibly WM-specific API will need to be used, though that would
require further study by the person who wants to do such a thing.

--
My sigfile ran away and is on hiatus.

Changed in wmctrl:
status: Confirmed → Invalid
Revision history for this message
Mathieu Girard (mgirard1) wrote :

Hum,
For me its works without problems:

wmctrl -i -r 0x03000003 -b add,hidden

Hides the window with id 0x03000003...

To show the window I use:

wmctrl -i -r 0x03000003 -b remove,hidden

PS:
The code seems to suggest that we can toggle, add or remove any property that starts with "_NET_WM_STATE_", since it adds the second argument "hidden" in upper case to that string.

See the _NET_WM_STATE section at "http://standards.freedesktop.org/wm-spec/1.3/ar01s05.html".

Cheers,
Mathieu

Revision history for this message
Mathieu Girard (mgirard1) wrote :

Please ignore my previous comment I did not read all the comments...

Revision history for this message
gsiliceo (nombre-falso) wrote :

This does not work for me
wmctrl -i -r 0x03000003 -b add,hidden

I used it, this way in compiz
wmctrl -i -r :ACTIVE: -b add,hidden

And it doesnt work, should i report a new bug?
Because all th other commands in http://standards.freedesktop.org/wm-spec/1.3/ar01s05.html work as described.

Revision history for this message
gsiliceo (nombre-falso) wrote :

Its definetly not a compiz bug because replacing :ACTIVE: with the window number it does work for other commands, fullscreen works, shaded works, just hidden doesnt.

Revision history for this message
gsiliceo (nombre-falso) wrote :

Mathieu what version of ubuntu do you run in 10.10 doesnt work.

Revision history for this message
Removed by request (removed3762826) wrote :

Doesn't work for me.

This problem is caused by wmctrl, because it should use XIconifyWindow (http://tronche.com/gui/x/xlib/ICC/client-to-window-manager/XIconifyWindow.html)

and not _NET_WM_STATE_HIDDEN for this purpose.

see
http://lists.freedesktop.org/archives/xdg/2009-October/011101.html

Changed in wmctrl (Ubuntu):
status: Invalid → Confirmed
Anton (a3d)
Changed in wmctrl (Ubuntu):
assignee: nobody → Anton (a3d)
assignee: Anton (a3d) → nobody
assignee: nobody → Anton (a3d)
Revision history for this message
Anton (a3d) wrote :

In this source ( https://github.com/geekless/wmctrl ) , bug fixed. Add action -Y (iconify).

wmctrl -Y :ACTIVE: - minimize active window

All work good!

Revision history for this message
Ben Stanley (ben-stanley) wrote :

When will there be a release containing the -Y minimize active window fix? It seems there has been no activity on github for for 2 years now.

Revision history for this message
kenn (whatnext) wrote :

I'm on 14.04 and above mentioned fix not working.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.