codehenry / xmonad

Automatically exported from code.google.com/p/xmonad
0 stars 0 forks source link

_NET_WORKAREA support #158

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Some applications (e.g. rdesktop and enso) need the _NET_WORKAREA property
to function properly. 

Here's the spec for _NET_WORKAREA (and the rest of EWMH):
http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#id2510516

Original issue reported on code.google.com by nathan.h...@gmail.com on 19 Mar 2008 at 7:11

GoogleCodeExporter commented 8 years ago
I’d be willing to see if I can add this to EwmhDesktops if you (or someone 
else)
tells me:
 * How to test this easily
 * What to do with desktops that are not current or visible?

Original comment by nome...@gmail.com on 21 Mar 2008 at 10:33

GoogleCodeExporter commented 8 years ago
I'm curious, what do rdesktop and enso use _NET_WORKAREA for?  _NET_WORKAREA 
doesn't
seem to fit xmonad's multi-screen model very well.

Original comment by SpencerJ...@gmail.com on 25 Mar 2008 at 8:36

GoogleCodeExporter commented 8 years ago
I won't pretend to know much about it, but I believe enso uses it to figure out 
where
to draw its window. I don't know about rdesktop, but I included it because dons
mentioned it on irc when I brought up _NET_WORKAREA.

As I understand it, _NET_WORKAREA just indicates the usable area (minus docks, 
etc)
that is available to applications for each screen. I don't know how best to 
handle
it, or how that fits into xmonad.

Original comment by nathan.h...@gmail.com on 28 Mar 2008 at 5:42

GoogleCodeExporter commented 8 years ago
I think its used by, for example, natuilus to find out where to put the icons. 
If
it’s just the screen minus struts (i.e. docks), it should be pretty doable. I 
guess
I’ll assign it to me and I’ll try to put it in EWMH.

I’d still like to have a test case so I can verify I did it properly. How 
does enso
behave now, and how should it, Nathan?

Original comment by nome...@gmail.com on 7 Apr 2008 at 6:16

GoogleCodeExporter commented 8 years ago
SpencerJanssen wrote on Mar 25, 2008: 
> I'm curious, what do rdesktop and enso use _NET_WORKAREA for?

Let rdesktop(1) say for itself:

  -g <geometry>
      Desktop   geometry   (WxH).  If  geometry  is  the  special  word
      "workarea", the geometry will be fetched from the extended window
      manager  hints  property _NET_WORKAREA, from the root window. The
      geometry can also be specified  as  a  percentage  of  the  whole
      screen, e.g. "-g 80%".

I wonder, whether I can position rdesktop window [in xmonad] using
`-g workarea' option...

/me tries

Well, rdesktop prints ``Window is missing property _NET_WORKAREA''
and starts fullscreen. I'll revert to my usual `-g 97%'.

Original comment by valery...@gmail.com on 16 Mar 2009 at 10:57

GoogleCodeExporter commented 8 years ago

Original comment by byor...@gmail.com on 25 Nov 2009 at 11:02

GoogleCodeExporter commented 8 years ago
This may be relevant to your concerns about multi-screen model:
http://thread.gmane.org/gmane.comp.gnome.wm-spec/1531/focus=1772

Original comment by liskni...@gmail.com on 26 Nov 2009 at 12:25

GoogleCodeExporter commented 8 years ago
This missing property is kind of annoying. I make crash the Windows Server I 
try to
rdesktop to each time I use the "-g workarea option".

Original comment by girard.cedric on 14 Apr 2010 at 2:34

GoogleCodeExporter commented 8 years ago
_NET_WORKAREA is also used in notify-osd, which calculates the position of 
notification bubble using this property.

Original comment by lubomir....@gmail.com on 15 May 2010 at 6:28

GoogleCodeExporter commented 8 years ago
_NET_WORKAREA is also used by freerdp, presumably for the same reasons as 
rdesktop (though without the graceful failure mode, it just segfaults).

Original comment by shea@shealevy.com on 7 Sep 2011 at 3:02

GoogleCodeExporter commented 8 years ago
All GTK+ applications use _NET_WORKAREA ( 
https://bugzilla.gnome.org/show_bug.cgi?id=690239 ), eg. for notifications 
(Steam Linux) or keyboard search fields (GMPC, Marlin). Bit of a bummer this is 
still missing.

Original comment by andreas....@gmail.com on 16 Dec 2012 at 7:03

GoogleCodeExporter commented 8 years ago
Attached patch works with one screen. I would push it except concerns:

 - maybe it doesn't work with multiple screens

 - maybe the property should only be set iff EwmhDesktops and ManageDocks are both used?

Original comment by vogt.a...@gmail.com on 17 Jan 2013 at 6:14

Attachments:

GoogleCodeExporter commented 8 years ago
I would argue that _NET_WORKAREA is dual to _NET_WM_STRUT_PARTIAL and if one is 
in play (as with ManageDocks) then the other should also be set.

I would also say the place to do this is avoidStruts since the workarea 
rectangles are the same ones passed on to sublayouts, only expressed in X11 
coordinates.

Original comment by allber...@gmail.com on 17 Jan 2013 at 6:27

GoogleCodeExporter commented 8 years ago
Is it possible to make _NET_WORKAREA  a variable which can be set? 

In a multi-monitor setup:
Earlier without this patch, it was appearing randomly on either 
of the screens.

Now, with this patch, it is appearing on one of the other screens 
(smaller one, than the one I intended). So it would be better if 
this was a variable which can be set (or equivalently based on primary screen, 
currently it is appearing on secondary screen).

Original comment by raghu.pr...@gmail.com on 1 Mar 2013 at 6:57

GoogleCodeExporter commented 8 years ago
raghu.prabhu13, what is "it" here?

Original comment by allber...@gmail.com on 1 Mar 2013 at 6:19

GoogleCodeExporter commented 8 years ago
Sorry for the omission, by 'it' mean any window which makes use of the 
property, in my case the notification window from notify-osd.

Original comment by rdprabh...@gmail.com on 1 Mar 2013 at 6:32

GoogleCodeExporter commented 8 years ago
Hrm. Wonder if this has the same bug avoidStruts has with multiple monitors? 
(cf. https://code.google.com/p/xmonad/issues/detail?id=526)

Original comment by allber...@gmail.com on 1 Mar 2013 at 8:47