Commit Graph

67 Commits

Author SHA1 Message Date
okan
26ba152692 Remove duplicate client queue (mruq); instead, remove and take the
global Clientq and place it inside screen_ctx since every client belongs
to a screen, then use the same per screen clientq to track stacking
order (the sole reason for mruq).
2014-09-08 20:11:22 +00:00
okan
3d12b6d1d9 more style nits 2014-09-07 19:27:30 +00:00
okan
be091b3523 screen_fromroot -> screen_find 2014-09-07 17:38:38 +00:00
okan
9f36d4af35 gc->hidden has never consistently kept track of a group's state;
group_show() and group_hide() are not the only ways a group can change
state - if all clients in a group are either hidden or unhidden, then
that group's state should change, as well as the various EWMH ways.
Instead of trying to keep track in a wide variety of places, simply
query the clients in a group before needing to take action based on the
group's state.  Solves long standing confusion of when a group is hidden
or not.
2014-08-24 15:37:45 +00:00
okan
b31b09dfc2 Purely mechanical; unify 'num', 'no' and 'shortcut'. 2014-08-20 15:15:29 +00:00
okan
7f45471538 whitespace 2014-08-20 12:35:39 +00:00
okan
6798e3dde3 Make sure we cycle through existing client's group membership and set
the hidden state on the group; important to know group hidden state
after a re-exec or restart of cwm (as easily seen in group menu).
2014-02-08 02:49:30 +00:00
okan
f793964c9e Introduce a region queue and replace screen's XineramaScreenInfo; we
still use Xinerama to populate the regions per screen, but will switch
at a more appropriate time.
2014-02-03 21:07:47 +00:00
okan
8a6dd51fac make this XQueryTree like the other 2014-02-03 20:29:05 +00:00
okan
ad96c16838 Move redundant bits from screen_init (while dealing with existing
clients) directly into client_init, performing the X roundtrip only
once. With the previous change in maprequest, this moves decision making
into one place for creating new clients.
2014-02-03 20:20:39 +00:00
okan
ad1b78c6d1 No need to store screen colormap and visual; rather just use the X
macros in the one place they are needed.
2014-02-02 16:29:04 +00:00
okan
5f9c7a21c7 Unlike free(3), XFree(3) can't be passed a NULL pointer. 2014-02-02 16:13:50 +00:00
okan
0608610cc7 move some init up and shed some blank lines 2014-01-27 15:13:09 +00:00
okan
43ccf4eae0 use consistent types 2014-01-03 15:29:06 +00:00
okan
f98f4615c0 Teach screen_find_xinerama() to apply gap only when told to do so;
adjust callers.  Needed for an upcoming feature.
2013-12-13 22:39:13 +00:00
okan
234b8214df move Cursors into conf. 2013-06-17 17:11:10 +00:00
okan
270df196ac - configure menuwin with the screen, then create the xft drawable using
the menu window since that's the only place on which we draw
- elminate the need to change the drawable on every font draw
2013-05-20 20:21:04 +00:00
okan
2b926784ba new -> init 2013-05-11 22:01:07 +00:00
okan
3a38686137 replace conf_{gap,color,font} with conf_screen since really we are
configuring the screen *after* parsing, just as we do a conf_client on
client manage.
2013-05-11 21:46:27 +00:00
okan
5ab3b373d3 group conf_* init functions 2013-04-30 21:12:20 +00:00
okan
94e341725b use an int in screen_init and avoid needing to cast for screen number (which). 2013-04-29 00:56:47 +00:00
okan
6296efadaa push Screenq into screen_init 2013-04-12 14:46:30 +00:00
okan
bf9d981597 teach screen_find_xinerama() about gap and adjust (simplify) callers;
menu becomes gap-aware for free.
2013-01-08 04:12:51 +00:00
okan
4ffe56b9a3 revert previous 2013-01-07 21:45:24 +00:00
okan
7c4ed94757 unbreak xinerama support from r1.41 for panning setups 2013-01-07 20:32:19 +00:00
okan
6e5dda99a6 merge in Xinerama screen query; no functional change. 2013-01-02 18:11:23 +00:00
okan
ce8ef02ed2 have screen_find_xinerama() return struct geom *reliably* instead of
XineramaScreenInfo; simplifies goop around the callers.
2013-01-02 16:26:34 +00:00
okan
c565b790ed expand CHILDMASK 2012-12-18 18:39:55 +00:00
okan
af13c08108 stash the default screen visual and colormap in screen_ctx 2012-12-17 18:34:06 +00:00
okan
7edabe94f2 x_setupscreen -> screen_init; no functional change. 2012-11-29 03:54:46 +00:00
okan
28224ff830 sort 2012-11-09 03:52:02 +00:00
okan
013497c79c Further simplify Xinerama init and re-init on XRR events.
While testing for Xinerama during setup was done display-wide, each time
XineramaQueryScreens() is called either in start-up or due to an XRR
event, the library re-tests for the Xinerama extension anyway before
moving on; so the initial test is redundant and allows another global to
go away with one other change: always fill in sc->xinerama (and _no),
regardless of the success of malloc in XineramaQueryScreens(), and use
it to see if Xinerama dimensions exist when asked by client and/or menu
code.
2012-07-18 21:53:22 +00:00
okan
57af364a21 check value 2012-07-16 01:42:00 +00:00
okan
e42d1c7f01 move the HasXinerama check into screen_find_xinerama and simplify logic;
moves closer to logic in menu code.
2012-07-16 01:36:30 +00:00
okan
186a78ff1e convert xmax/ymax uses to view geometry. 2012-07-13 15:21:35 +00:00
okan
cc08aef0df introduce screen "view" area and "work" area (gap applied) to simplify
various blocks that require understanding the screen geometry.
2012-07-13 14:18:04 +00:00
okan
cb893d0aa9 querying for Xinerama should be done per display, not per screen, so
move chuck to display init; allows some shuffling to occur limiting
screen_init_xinerama()'s scope while keeping order intact.
2012-07-06 14:18:00 +00:00
okan
1124ee5cc1 the display's width and height are updated after an XRandR event so we
don't need to pass down the new values to screen_update_geometry(); so
just read the width/height values directly for both uses of
screen_update_geometry().  prep for further changes in this area.
2012-07-05 17:35:13 +00:00
okan
f98e123bfc re-implement atom handing; makes for a normalized and more consistent
separation between cwm and ewmh.  seen by a few.
2012-07-03 13:49:03 +00:00
okan
c8cd94882d tag and comment cleanup; ok oga@ 2011-05-11 13:53:51 +00:00
okan
9b4985439e (0,0) is also inside in the screen; from Sviatoslav Chagaev.
ok oga@
2011-03-22 10:54:42 +00:00
okan
e88bda0df5 - allow per-screen gap; not (yet) user configurable.
- teach _NET_WORKAREA about gap.

ok oga@
2010-01-27 03:04:50 +00:00
okan
ccb207a8a8 pull all non-X11 headers from calmwm.h and place them only where they
are required.

encourged to go all the way by oga@
2009-12-15 04:10:42 +00:00
okan
b6b7d273d4 merge the 2 common header files; specific includes to be pulled out as
separate commits.

ok oga@
2009-12-15 03:24:36 +00:00
oga
3b87bdb047 add _NET_WORKAREA. for now we ignore the gap, this'll change soonish.
ok okan@
2009-12-11 18:09:16 +00:00
oga
28e94b2fbc another int/long fixup that was giving dodgy property values on amd64, shame on
me for not reading xlibs (appauling) documentation more closely.

ok okan@
2009-12-11 17:57:38 +00:00
oga
a7c3a7cac3 Implement _NET_CURRENT_DESKTOP, _NET_DESKTOP_VIEWPORT and
_NET_DESKTOP_GEOMETRY.

ok okan@
2009-12-10 23:14:58 +00:00
oga
134e777cf0 finish unfucking the screen_ctx handling.
remove screen_current() it was utterly bogus when nscreens > 1.

pass a fake client_ctx in the case where there's no client and the
kbfunc or mousefunc doesn't need a real one, it just contains the
current screen, modify these functions so that they pass down the screen
context to their callees.

make groups per screen, it's the only way it makes sense in this regard.

ok okan@.
2009-12-10 17:16:51 +00:00
tobias
42bf29fb20 style (whitespaces)
ok oga, okan
2009-11-28 17:52:12 +00:00
tobias
afaf69cefc Corrected grammar in comment.
ok (and better style suggestion by) oga, okan
2009-11-22 21:38:50 +00:00