Commit Graph

5069 Commits

Author SHA1 Message Date
Uli Schlachter 711d78b50c textbox: Throw a lua error on invalid markup
Idea by JD, inspired from a patch by farhaven.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-07-16 19:16:04 +02:00
Uli Schlachter ba518f9381 Read a textbox' text correctly
Previously, querying a textbox' .text property would return the text with all
pango markup stripped.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-07-16 19:10:41 +02:00
Uli Schlachter 11084c774c Handle errors in the config better
luaA_loadrc() now returns a failure when executing the config file causes an
error.
Previously it returned a success which meant the next config file wasn't tried.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-07-15 19:21:02 +02:00
Uli Schlachter e9c2907488 Don't manually unban all windows on exit
The last commit made sure the X server does this for us instead. No need to do
that work twice.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-07-14 21:37:07 +02:00
Uli Schlachter 58f79dca8a Add all managed client windows to the safe set
When an application loses its connection to the X11 server, all the windows in
its save-set are saved by reparenting them back to their closest ancestor. Also,
to they are unconditionally mapped. This second property is exactly what we
need: All windows should be in mapped state, else the next window manager which
starts up won't be managing them.

This should fix all bugs where clients where lost due to a restart, yay! :)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-07-14 21:35:06 +02:00
Uli Schlachter 0517b0002f Don't reparent systray windows on exit
Since the last commit, systray windows will automatically be reparented by the
X11 server. This means we no longer have to do this ourselves.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-07-14 17:42:53 +02:00
Uli Schlachter dcf2f03881 Add systray windows to the save-set
When an X11 client disconnects from the X server, all of its windows are
destroyed. This also means that all the sub-windows of those windows are
destroyed which is not necessary what one wants to happen.

To work around this, X11 has a "save-set". All the windows that are in the
save-set are reparented to their closest ancestor when they would normally be
destroyed. This is just what this code needs. :)

(The windows in the save-set are also mapped when they are saved, dunno if this
hurts here or not)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-07-14 17:36:10 +02:00
Uli Schlachter 2e0ea80cb3 Tasklist: Listen to the correct signals
The tasklist shouldn't care about the tag history or new tags showing up and it
also shouldn't care about tags disappearing on other screens (on the current
screen the tasklist needs to update because the tag might have been selected).

On the other hand, the tasklist really should care about tags being selected and
unselected. This worked before because this causes changes to the focus history.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-06-22 16:45:06 +02:00
Uli Schlachter 7b65f068a1 Reorder some code for fullscreening windows
When one sets a client to fullscreen, this is what currently happens:
- lua code: c.fullscreen = true
- The C code emits request::fullscreen without having touched the client's
  fullscreen property yet (c.fullscreen is still false)
- awful.ewmh changes the client's geometry to fullscreen via c:geometry()
- This causes property::geometry to be emitted
- awful.layout reacts on this and causes the screen to be re-arranged, undoing
  the fullscreen geometry set in awful.ewmh
- The C code for c.fullscreen = true continues and actually changes the client's
  fullscreen flag

The result of this is that we get a client which thinks it is fullscreen'd
without actually being that.

Fix this by first changing the client's fullscreen property and then emitting
request::fullscreen. Same thing for maximized_{vertical,horizontal}.

Thanks to Jim Pryor for reporting this bug and helping reproducing it.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-06-18 18:24:05 +02:00
Uli Schlachter 0c393c8f39 xwindow_set_state(): Use uint32_t instead of long
This function calls xcb_change_property() with format==32 which means that it is
called with a 32-bit integer. However, on 64-bit machines, sizeof(long) == 64
which means that this code did the wrong thing.

This wasn't noticed before because it only causes a real difference on
big-endian machines.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-06-16 18:16:42 +02:00
Uli Schlachter 470c2e20d0 Update the tasklist when a client's icon changes
Thanks to a pidgin-using friend for reporting this.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-06-14 20:06:02 +02:00
Uli Schlachter 0e869b7b15 Remove invalid variable usage
There is no variable called "startup" in awful.rules.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-06-14 20:04:38 +02:00
Uli Schlachter e291c03982 Handle _NET_WM_DESKTOP more intelligently
This makes sure that an invalid value for this property doesn't cause the client
to have no tag at all. This should be especially useful when one uses dynamic
tags and restarts awesome which causes less tags to exist than before.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-06-14 20:04:38 +02:00
Uli Schlachter 65dfdf01ce Remove _NET_WM_DESKTOP when client got no tags
EWMH says that "Window Managers MUST keep this property updated on all windows",
but doesn't say anything about clients which got no desktop at all. Removing the
property seems to be the best we could do.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-06-14 20:04:38 +02:00
Julien Danjou 688b9f7af0 Fix mouse::leave signal emit on widgets (FS#774)
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-06-09 16:09:41 +02:00
Gregor Best 6e6a07b660 dbus: fix compiling error
Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-06-06 14:32:54 +02:00
Julien Danjou bd30468d7a dbus: only warn, dot not raises an error (FS#713)
This is not user-called error, so it's a really bad idea to raise an Lua
error here.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-06-06 10:46:01 +02:00
Julien Danjou e0c259406e naughty: return nothing, not nil
This is not a valid return value for a D-Bus method.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-06-06 10:39:16 +02:00
Julien Danjou e4c8c11564 Fix missing tostring
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-06-01 11:43:45 +02:00
Perry Hargrave 6cb61939c4 tag.lua: check name argument to add() is valid
Signed-off-by: Perry Hargrave <perry.hargrave@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-06-01 10:31:24 +02:00
Uli Schlachter 1615cff82a Tasklist: Add some missing parentheses
"a .. b or c" is equivalent to "(a .. b) or c", but we want "a .. (b or c)".
This bug caused an "attempted to concatenate a nil value" error message.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-30 18:53:04 +02:00
Perry Hargrave 2f3f84c994 tag.lua: add() create tags with full table of properties
tag.add(name, props):
    make tags and pass a table of properties to apply to it

tag.new:
    modified to use add() instead of calling capi.tag

Signed-off-by: Perry Hargrave <perry.hargrave@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-29 11:22:27 +02:00
Perry Hargrave 77e39a5f07 tag.lua: getidx() returns index of tag
tag.getidx(t):
    Return the index of 't' in the screen[]:tags() table. Return 'nil'
    if 't' is not found.

Signed-off-by: Perry Hargrave <perry.hargrave@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-29 11:07:25 +02:00
Perry Hargrave 7b60f84fd0 tag.lua: move() re-index tags
tag.move(i, t):
    move tag 't', or tag.selected(), to index 'i' in the current
    screen's tags table.

Signed-off-by: Perry Hargrave <perry.hargrave@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-29 11:05:36 +02:00
Gregor Best f890aa392c layouts/tile: completely fix client borders
Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-29 10:53:47 +02:00
Gregor Best 752f0225d2 layouts: let client sizing honor the border width
Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 20:39:56 +02:00
Julien Danjou 61430f860d ewmh: use client signals to update NET_ACTIVE_WINDOW
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:36:35 +02:00
Julien Danjou f4876b5275 ewmh: use signals to update client hints
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:29:34 +02:00
Julien Danjou 38edc58097 client: implements maximized and fullscreen requests with Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:29:29 +02:00
Julien Danjou 434a6e5275 ewmh: remove useless update_hints calls
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:29:22 +02:00
Julien Danjou abd73e4f08 stack: stack_client_* calls stack_windows()
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:29:16 +02:00
Julien Danjou 4ef5e816ec client: remove internal geometry
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:29:11 +02:00
Julien Danjou c94f7b6767 window: import border_width property
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:29:06 +02:00
Julien Danjou 4f6667b56f property: remove unknown code
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:28:59 +02:00
Julien Danjou a20400d60f client: move stack code into stack
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:28:49 +02:00
Julien Danjou 9ce234a533 awful.widget.tasklist: use symbols chars rather than images
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:28:43 +02:00
Julien Danjou ad23a4ca64 fix tag header and order build
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:28:25 +02:00
Julien Danjou 5359e738e8 key: split resolving in keyresolv
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:28:20 +02:00
Julien Danjou 2b5bb2c34c window: add border_color property
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:28:15 +02:00
Julien Danjou cdd888d6cf xwindow: add xwindow_set_border_color helper function
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:28:10 +02:00
Julien Danjou d3c277b8ab window: add buttons support
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:28:05 +02:00
Julien Danjou af654a75d2 xwindow: ungrab before grabbing
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:28:00 +02:00
Julien Danjou 62f0e62d5e wibox: don't listen for every button press/release
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:27:56 +02:00
Julien Danjou f7746a198c luaclass: take care of inheritance garbage collection
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:27:49 +02:00
Julien Danjou 92717a0849 window: add strut support
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:27:45 +02:00
Julien Danjou 220d072164 window: import class
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:27:42 +02:00
Julien Danjou fccc451f89 luaclass: add inheritance support
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:27:04 +02:00
Julien Danjou 9393b2d111 screen: add index by output name (FS#361)
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:26:23 +02:00
Julien Danjou c08b90345f screen: export RandR information
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:26:20 +02:00
Julien Danjou 8c87b7cb57 screen: store RandR information
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:26:17 +02:00