Commit Graph

134 Commits

Author SHA1 Message Date
Julien Danjou 8d1f20c5ad client: implement maybevisible(), and use it for maprequest
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-11 11:57:57 +02:00
Julien Danjou 4b2293d43d client: rewrite focus()
Hidden client are not more hiddent if focus requested (FS#245)

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-11 11:51:54 +02:00
Julien Danjou b92a07c2ed Revert "Alternative export method of arrays from C to Lua"
This reverts commit 4ab499fe26.

Conflicts:

	lua.h
2008-08-11 02:21:21 +02:00
Konstantin 4ab499fe26 Alternative export method of arrays from C to Lua
The patch is mainly to export client_array_t object to Lua,
but can be used to export any ..._array_t object.

The idea: export to Lua not a table, but userdata with
metamethods to get/set/define length of ..._array_t object
directly.

Now when I get clients field from tag object C code
creates full copy of client_array_t structure into Lua table.
It takes traversing a whole array of data.

I did it in other way: userdata is exported, with __index,
__newindex, and __len meta-methods defined, and Lua
script gains direct access to client_array_t C-array:
it can get client object, get length of array and assign
client objects to some index in C-array.

Pros:
No overhead of creation a copy of C-structure into Lua-table:
if I want just to test a number of clients for a tag, I don't need
a whole loop to build table, I just want to read clients->len field,
and I do so via __len meta-method.
Also if I want to get some client from tags.clients, I don't need
to create ALL clients Lua-objects, I just get client_t C-struct
and create Lua-object from it. Just in place.
So Lua-loop enuming all tag.clients is not 2 loops internally
(first create copy of tag.clients into Lua-table, then enum this table),
but only one, and if I break out of loop in the middle, I create
only some client Lua-objects, not all of them from tag.clients.

Contras:
As far as clients field is not a table, I cant use pairs/ipairs
and other table functions for it.
But it can be implemented in other way:
for k,c pairs(tag.clients) => for k = 1, #tag.clients,
table.insert(tag.clients, client) => tag.clients[#tag.clients+1] = client

etc.

One more Pro now:
As far as tag.clients in current implementation returns copy of data
table.insert doesn't do what's expected: it doesn't really add client
into tag.clients "array".
With my implementation client is added as expected, as we work with
client_array_t structure directly.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-10 16:18:59 +02:00
Julien Danjou 254a39b6d3 statusbar: handle systray invisibility
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-05 16:59:54 +02:00
Julien Danjou 1cc071e24f client: add refcount for clients
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-31 17:29:45 +02:00
Julien Danjou f28b4c07b2 tasklist: stop using client markup
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-10 11:02:11 +02:00
Julien Danjou 00e9af11b8 client: fix title update
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-08 18:04:08 +02:00
Julien Danjou 3de2bf3918 dbus: add client support
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-08 10:54:57 +02:00
Julien Danjou 1d64f8231c client: use atom name to update title
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-08 08:42:39 +02:00
Pierre Habouzit a67e5023c0 If awesome believes we have the focus, well, do not unfocus ourselves.
This avoid flickering when you repeteadly click on a client.
Also make the function client_focus void, it always returned true, and
nobody cares about the result.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-27 09:34:47 +02:00
Julien Danjou 086bada825 client: split out of setfloating layer handling
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-25 22:26:53 +02:00
Michael Gehring 60591fe9bd client: export client_geometry_hints 2008-06-18 18:48:38 +02:00
Julien Danjou 92f369e3aa lua: userdata_new is now macro
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-18 18:31:35 +02:00
Julien Danjou e6b14c1d39 [client] Fix border width setting
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-11 08:14:54 +02:00
Julien Danjou 1049393840 Revert "Replace tags by workspaces"
This reverts commit 00f966ea04.

Revert "[focus] Fix bogus arguments"
This reverts commit 816b5d16bc.

Revert "[mouse] Fix bug with floating"
This reverts commit 89daa72790.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-09 21:56:03 +02:00
Julien Danjou 00f966ea04 Replace tags by workspaces
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-09 16:30:46 +02:00
Julien Danjou 6ba90facb0 [client] Various documentation update and fixes
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-05 09:27:16 +02:00
Julien Danjou 3ab739553c [client] Add and honor the noborder attribute
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-28 14:33:45 +02:00
Julien Danjou 0e3531d3a3 [client] Rework raise and mouse stuff
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-26 18:08:29 +02:00
Julien Danjou db5430420d [client] Create luaA_client_userdata_new() function
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-23 22:56:03 +02:00
Julien Danjou ec21647c87 [client] Remove useless client_get_byname()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-20 19:59:58 +02:00
Julien Danjou 1f046b3c9f [everything] Switch from libconfuse to Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-20 18:01:15 +02:00
Arnaud Fontaine a4c7ffffc7 [client] Add client_redraw (FS#170) 2008-05-11 17:56:26 +01:00
Julien Danjou c88b0b15ff [client] Merge zoom with swap, change togglefloating to setfloating
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:35 +02:00
Julien Danjou b75e462223 [client] Merge vertical and horizontalmax inside togglemax
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:35 +02:00
Julien Danjou d5859c60f7 [client] Merge focus{prev,next} and swap{prev,next}
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:35 +02:00
Julien Danjou f0e29977d8 [client] introduce client_style_get() and use it in tasklist/titlebar
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:06 +02:00
Julien Danjou eab7633675 [tasklist] Remove styles; use drawtext format
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:04 +02:00
Julien Danjou d1635db59f [client] Rename Client type to client_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:03 +02:00
Julien Danjou e33d6cae80 [uicb] Rename Uicb type to uicb_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:03 +02:00
Julien Danjou eb1a9bd69c [all] Rename Layer to layer_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:02 +02:00
Julien Danjou 97dc830db5 [util/rules] Move Fuzzy from rules to util
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:01:02 +02:00
Arnaud Fontaine dafafd077c Port Awesome to XCB 2008-05-03 12:00:59 +02:00
Wolfgang Kroener 3af77fd56e add ewmh stacking layers
Add layers for ewmh stacking order
http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html#STACKINGORDER
desktop, below, tile, float, above, fullscreen

Signed-off-by: Wolfgang Kroener <wk@azog.de>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-03 12:00:25 +02:00
Julien Danjou 762645ca32 client_focus() now return bool to indicate if it has given focus
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-03-25 11:28:38 +01:00
Julien Danjou c5afa7753b Split restack function out of focus, and fix click-to-raise
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-03-24 16:34:41 +01:00
Julien Danjou e22d57a0ca Change the way to do resize
Go back to old school

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-03-23 15:52:20 +01:00
Julien Danjou 9bd32fc3b8 Split titlebar stuff into titlebar.[ch], and uicb_client_toggletitlebar 2008-03-23 15:52:19 +01:00
Julien Danjou bb453bd444 s/client_titlebar_update_position/client_titlebar_update_geometry/g 2008-03-23 15:52:19 +01:00
Julien Danjou dce101d044 Split out titlebar handling into layout for non-floating, and into resize for floating 2008-03-23 15:52:18 +01:00
Julien Danjou 3c3015fd76 Remove resize_hints args to client_resize(), force usage of client_geometry_hints() 2008-03-23 15:52:18 +01:00
Julien Danjou c6eec955c8 Rename Area to area_t 2008-03-23 15:52:18 +01:00
Julien Danjou 6b4c9fed83 Remove useless ; after DO_SLIST macro 2008-03-23 15:52:17 +01:00
marco candrian 4ff0dae17e trailing whitespaces removed
like:
find . -iname "*.txt" -o -iname "*.c" -o -iname "*.h" | xargs sed -i 's/\s\+$//'

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-02-13 09:05:10 +01:00
Julien Danjou b2e004b453 add scratch window support 2008-02-06 09:06:43 +01:00
Julien Danjou 4ad1f8a54a don't compute position if program or user specified ones 2008-02-01 10:42:16 +01:00
Julien Danjou ee1214846e rename some client functions 2008-01-29 08:21:05 +01:00
Julien Danjou 95d5fe299e rename focus() to client_focus() 2008-01-27 19:07:39 +01:00
Julien Danjou c22430a115 fix handling of window raisings 2008-01-25 23:43:16 +01:00