Commit Graph

814 Commits

Author SHA1 Message Date
Julien Danjou 9b654095ec client: add Globally Active Input Model (GAIM)
with small fixes, changes:
- client_focus handles case when c==NULL
- don't focus on already focused client

- added window_takefocus function, that sends WM_TAKE_FOCUS client
  message. It is needed by GAIM and Locally Active Input Model.
- moved invocation of lua focus hook from client_focus to
  client_focus_hook function.

- client_focus has one additional paremeter, sendmessage.
  It is used in FocusIn event handler, to disable sending SetInputFocus
  and WM_TAKE_FOCUS messages ( to avoid infinite loop )

Signed-off-by: Mariusz Ceier <mceier@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-03 17:24:40 +01:00
Julien Danjou 9db9abd02a client: remove _AWESOME_FLOATING
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-26 12:35:46 +01:00
Maarten Maathuis c675bf64ec client: fix client_setborder
- Don't know why I didn't do this correctly in the first place :-|

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-20 09:48:34 +01:00
Julien Danjou f711503d7b client: call unfocus hook when we changed focused client (FS#454)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-19 16:27:06 +01:00
Julien Danjou a95fc407b5 client: add .id field
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-18 16:53:42 +01:00
Maarten Maathuis 4f447bcbdc Revert "client: remove a few useless client_need_arrange()."
This reverts commit c9caf05c2d.

- They were not so useless after all, the reason is that before or after setting the new state client_need_arrange() is a no-op.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-17 10:39:43 +01:00
Maarten Maathuis c9caf05c2d client: remove a few useless client_need_arrange().
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-16 10:34:53 +01:00
Julien Danjou ada983d08e ewmh: add missing window types
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-13 11:25:38 +01:00
Gregor Best 050a6bbb61 client: add client_seturgent() and remove urgent hint on focus
According to EWMH, the window manager is responsible for removing the
urgent state of a client. Also, this commit adds a new
client_seturgent(client_t *, bool) function to set the urgent state if
needed.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-11 19:04:09 +01:00
Mariusz Ceier 01eff69bf4 client: fix focus subsystem
We don't need to unfocus currently selected client.
Added WM_TAKE_FOCUS atom, so we can implement correct ICCCM,
focus behavior, in relation to Input Models ( sections 4.1.7 [1],
4.2.7 [2] ).
Currently correctly implemented are, "No Input", and "Passive"
models, and additionally works "Locally Active".
To test focus-in and focus-out events I used program from [3].

[1] http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.7
[2] http://tronche.com/gui/x/icccm/sec-4.html#s-4.2.7
[3] http://mail.gnome.org/archives/gtk-devel-list/2001-November/msg00334.html

Signed-off-by: Mariusz Ceier <mceier@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-11 18:54:02 +01:00
Maarten Maathuis fdee06fe31 client: fix titlebar stacking
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-11 01:56:57 +01:00
Maarten Maathuis 8e58460109 client: add above and below to capi + related fixes
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-09 12:30:19 +01:00
Maarten Maathuis bd6e568083 event: fix configurerequest
- We have to be careful with geometry around protocol code.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-08 14:10:17 +01:00
Maarten Maathuis 0626d42396 client: change border handling slightly + remove some old cruft
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-08 14:07:18 +01:00
Julien Danjou 21e6db0049 client: reset transient_for on unmanage
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-08 14:00:30 +01:00
Maarten Maathuis 41b892291d client: implement client struts in the capi.
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-08 13:21:20 +01:00
Julien Danjou 2c6dc1048d titlebar: correctly ban/unban (FS#443)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-05 17:55:59 +01:00
Julien Danjou a13f3fe553 client: handle tags assignment in awful (FS#441)
This also deactivate group management. This can be done in Lua now.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-03 12:20:17 +01:00
Maarten Maathuis b8a371864b client, titlebar: fix some issues involving titlbars and dialogs.
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-03 10:32:00 +01:00
Julien Danjou 6c963a6eed client: check tags even after transient/group tag copy (FS#434)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-03 10:24:04 +01:00
Julien Danjou 2a2ce6e83e client: switch to xcb-icccm 0.3.3
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-01-31 16:03:06 +01:00
Julien Danjou b878e1491f client: reset height and width on unbanning
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-01-30 15:07:49 +01:00
Julien Danjou 9e89753018 client: change stacking order
We had:
ontop clients -> ontop wiboxes -> fs clients
Now:
fs clients -> ontop clients -> ontop wiboxes

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-01-30 12:46:37 +01:00
Julien Danjou f82ac1972f client: make `ontop' windows under fullscreen
`ontop' wiboxes will also be on top of `ontop' clients.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-01-30 10:47:54 +01:00
Julien Danjou d08b04ce9d client: move client to screen correctly if belonging to a group
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-01-23 15:34:00 +01:00
Julien Danjou 33d3aeb7d0 client: do not honor groups if physical screen are different
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-01-23 11:11:26 +01:00
Julien Danjou 1d759531c4 client: add explicit braces
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-01-18 11:01:48 +01:00
Gregor Best 51d6df2483 client.c: fix deprecation of honorsizehints
Signed-off-by: Gregor Best <farhaven@googlemail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-01-11 19:11:48 +01:00
Julien Danjou d02403e6b9 event: fix ConfigureRequest handling (FS#424)
ConfigureRequest are sent with real X windows size, not fake size with
border and titlebar.
So we need to re-add size of borders and titlebar before calling
client_resize(), otherwise we set a X size the client can considers wrong
and then we start loopin forever since we do not handle its request to
be sized correctly.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-01-10 10:03:41 +01:00
Julien Danjou d9c868b627 client: implements per-client key bindings
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-01-05 16:59:20 +01:00
Mariusz Ceier 2e345fbcda client: allow selection of nofocus windows
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-01-02 11:24:48 +01:00
Julien Danjou d6dbb00f10 client: add support for input faking
This is done using XTest extension.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-29 17:03:17 +01:00
Julien Danjou 9f47cb4d01 client: document content property
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-29 15:28:24 +01:00
Julien Danjou bdbcd9352d client: add content property
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-29 15:21:00 +01:00
Julien Danjou d779aa6c40 client: client screen change at manage is done in Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-29 12:26:01 +01:00
Julien Danjou cd667802db hooks: manage gets an extra startup arg
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-29 12:23:37 +01:00
Arnaud VALLAT ba6f5e42bb ewmh: add suport for _NET_ACTIVE_WINDOW message
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-15 10:47:07 +01:00
Maarten Maathuis 6e199bbd76 client, swindow: switch to a more convient definition of geometry
- In many places i see people correcting for border width and titlebars.
- This new definition is the equivilant of what used to be fullgeometry.
- The internal geometry is now contained to a few functions that few people ever touch.
- This should avoid confusion and make code easier.
- Also protect against several unsigned overflows.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:24 +01:00
Julien Danjou 7fb4d40e43 client: export size hints completely
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:24 +01:00
Julien Danjou 9d175377b8 client: stop duplicating size hints data
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:24 +01:00
Julien Danjou f6917a2288 client: rename oldborder and stop reseting on unmanage
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:24 +01:00
Gregor Best bc246c8b84 screen.c: fix movetoscreen for different sized screens
Signed-off-by: Gregor Best <farhaven@googlemail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:23 +01:00
Maarten Maathuis dbbe48898a client: Also check for struts on client_{ban,unban}
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:23 +01:00
Maarten Maathuis 0aba4013e9 client: Improve handling of transient windows.
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:23 +01:00
Julien Danjou 26da80f90a draw: remove custom markup support
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:23 +01:00
Maarten Maathuis 8442bb10ca client: Use window groups to improve initial tag placement.
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:22 +01:00
Maarten Maathuis 81f460ed76 client: Remove a line of incorrect comment.
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:22 +01:00
Maarten Maathuis fbf28cc80d client: Expose leader_id.
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:22 +01:00
Maarten Maathuis 40c208a422 client: Expose group windows.
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:22 +01:00
Julien Danjou c3c20c4f8e client: move floating state handling to Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:22 +01:00
Julien Danjou 26de388c4c client: add mouse_leave hook
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:22 +01:00
Julien Danjou 2037a053a9 layout: move layout code to Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:21 +01:00
Maarten Maathuis d7f92fdf9f ewmh: Support all known non-override redirect window types.
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 19:19:29 +01:00
Julien Danjou e0de3b153e client: deprecate minimize in favor of minimized
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 19:19:29 +01:00
Julien Danjou 576a1e85fc client: maximize belongs to client internal
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 19:19:29 +01:00
Julien Danjou dc6583c3e0 client: rename geometries
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 19:19:29 +01:00
Maarten Maathuis f9c2ee62a3 client: reimplement client_{ban,unban} for more performance
- From now on clients shall remain mapped for their entire lifetime.
- This should seriously boost tag switching speed with composite active.
- A lesser improvement may be noticed in non-composite situations.
- Titlebars that are set to invisble are still unmapped.
  Since it would clutter the implementation and titlebars are cheap to render.
  Not to mention that invisible titlebars are pretty rare.
- It's safe to attach titlebars while the client is banned.
- Titlebars are explicitly removed at exit.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 19:19:28 +01:00
Julien Danjou 53a830aea1 mouse: move resize code to awful.mouse
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:41 +01:00
Julien Danjou 49bb7e87b4 mouse: remove client_move, move it to awful
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:41 +01:00
Julien Danjou d7784697cb client: check clients are different when swapping
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:41 +01:00
Julien Danjou 506e453a2f remove deprecated functions
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:40 +01:00
Julien Danjou e8186e687e client: fix returned value for non transient windows
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-07 11:08:00 +01:00
Julien Danjou c63657049f client: check KDE dock app before
Otherwise we leak the NETWM_ICON retrieval.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-07 11:05:21 +01:00
Julien Danjou b0090950a0 Revert "lua: do not use otable where table are enough"
This reverts commit a220d46850.
2008-12-04 16:55:40 +01:00
Julien Danjou a220d46850 lua: do not use otable where table are enough
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-04 13:29:00 +01:00
Julien Danjou d1db6903fa luaa: check that function is not NIL before pushing and calling
Otherwise we may push unused elements because dofunction() checked
_after_ if the function was nil, or not.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-20 17:48:23 +01:00
Julien Danjou 0e31cdfc62 client: fix titlebar stacking
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-18 10:39:42 +01:00
Maarten Maathuis 223c052760 client: drop unnecesary resize
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-17 20:26:14 +01:00
Maarten Maathuis 26cff63e42 client: fix typo
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-17 20:25:59 +01:00
Maarten Maathuis bfcd5b14a2 client: Make sure the titlebar is visible.
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-17 20:25:21 +01:00
Julien Danjou c63f16b233 client: geometry() honors size hints hint
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-17 16:25:54 +01:00
Michael Hofmann 2946aa3750 client: stack wiboxes on top of desktop windows
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-17 09:58:43 +01:00
Julien Danjou 9e877b57d2 client: fix translator for fixed window, add BELOW (FS#377)
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-17 09:56:34 +01:00
Julien Danjou d6964c2052 client: register floating geom if it comes from floating
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-15 14:18:49 +01:00
Julien Danjou 2e49d7554d client: do not resend border width on resize
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-15 14:18:24 +01:00
Julien Danjou d45e5f8600 client: merge fullgeometry with geometry
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-14 20:26:48 +01:00
Julien Danjou 19038336a9 client: return real floating status
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-14 13:40:40 +01:00
Julien Danjou 3ebcc1aa5a luaa: add more deprecation information
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-14 12:12:01 +01:00
Julien Danjou bb05a3809a client: document and rename size_hints
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-12 15:43:52 +01:00
Julien Danjou 9af7b53b84 client: add lower() method
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-12 11:27:58 +01:00
Julien Danjou 5d87bccbc2 client: add support for transient_for in Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-10 15:43:04 +01:00
Julien Danjou eac8a88daa client: reduce transient client flickering
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-10 12:32:04 +01:00
Julien Danjou 79468cf3a1 client: fix fixed size detection and resize blocking
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-10 12:10:06 +01:00
Julien Danjou 922f5a50da client: handle fixed window stacking and DIALOG windows
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-06 16:05:43 +01:00
Julien Danjou 207df8e2b0 luaa: change deprecate() with more useful info
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-05 11:54:08 +01:00
Julien Danjou 2d753ba228 client: move to screen after checking hints
If we do the opposite, a window which is floating considering its EWMH
attribute may never get a move-resize request so its f_geometry will be
registered only.

Since we put it after with this patch, it screen_client_moveto() will
send correctly the move-resize request.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-05 10:24:23 +01:00
Julien Danjou 46dfccd95f client: fullscreen do not care about padding
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-03 19:49:01 +01:00
Julien Danjou 42d7bd49ab client: fix ontop wibox stacking
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-03 16:54:13 +01:00
Julien Danjou 9ce1f986d9 client: better handling of transient windows stacking
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-03 14:39:38 +01:00
Julien Danjou 85c7bf07c9 luaa: merge tostring() with DO_LUA_NEW
Also use the same format as standard Lua for tostring output.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-26 16:15:49 +01:00
Julien Danjou 737a70f60c remove a bunch of useless #include-s
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-24 20:57:29 +02:00
Julien Danjou c954c33261 cnode: move struct to cnode header
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-24 20:40:02 +02:00
Julien Danjou d3ceff0282 structs: move some define out
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-21 17:37:14 +02:00
Julien Danjou 5ab2497b43 client, screen: use geometry rather coords as keyword
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-21 15:31:52 +02:00
Julien Danjou 2a36b021d1 client: icon_name is stored and watched
This permits to update tasklist on icon name changes.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-21 15:15:28 +02:00
Julien Danjou 862fe193ee Rewrite {tag,task}list in Lua.
This removes the C implementation of taglist and tasklist widgets and
use a Lua one.

This works by letting .widgets property of wiboxes to be a table with
table, and setting a special metatable on them which notify awesome on
newindex events, updating wiboxes.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-20 20:06:09 +02:00
Julien Danjou 5c8a4dee4a client: export skip_taskbar
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-20 17:27:52 +02:00
Julien Danjou ba66ae8035 hooks: add clients hook
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-20 15:04:56 +02:00
Julien Danjou c9d9d45ab5 client: do not allow to modify name
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-19 18:51:21 +02:00
Julien Danjou 71f999eb7f client: change isprotodel to hasproto()
That's more generic.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-11 09:38:48 +02:00