Commit Graph

5571 Commits

Author SHA1 Message Date
Uli Schlachter 740db10951 Fix another case of unbalances lua stack
Previously, client_set_icon() popped the image that was being used. When I made
this use oocairo, I accidentally made this function not pop anything at all, so
the caller has to do this now.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-10 22:32:08 +02:00
Uli Schlachter e7cd824c07 Ignore changes to the root pixmap
We no longer use the root pixmap at all, so we can ignore changes to it.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-10 15:10:04 +02:00
Uli Schlachter b9c427d48f Fix another lua stack balance problem
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-10 15:07:07 +02:00
Uli Schlachter 8b16d1ee4b client_unfocus_update: Merge into client_unfocus
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-10 14:59:02 +02:00
Uli Schlachter 3dbf89c990 Lazyle set the input focus (FS#804)
Instead of immediately setting the X11 input focus when client.focus is assigned
something, we now just remember that we'll have to do something later. The focus
is then set in the next prepare call by libev (= after the current main loop run
is done).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-10 14:57:14 +02:00
Uli Schlachter f931af7ce1 Rename globalconf.client_focus to focus.client
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-10 14:46:56 +02:00
Julien Danjou fe43b99a2a client: remove prev_client_focus
Not sure it's good however.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-10-10 14:05:52 +02:00
Uli Schlachter e55ed50b89 Fix an unbalanced lua stack
event_button_callback() pops the top element from the stack, but
event_emit_button() doesn't. This got was expecting both to pop the top from the
stack so Bad Things(tm) happen.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-10 13:32:47 +02:00
Uli Schlachter 38d4602425 margin: Accept individual margins
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-08 17:22:00 +02:00
Uli Schlachter 97d62c86ac Remove outdated luadoc for widgets
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-08 17:21:39 +02:00
Uli Schlachter 2ca25128a5 Remove outdate require("awful.widget.layout")
The file isn't present any more and it's not needed anyway.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-07 21:46:52 +02:00
Uli Schlachter e64d36b104 Awful.menu: Fix the text
Looks like someone wasn't using set_markup() where he was supposed to do so.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-07 14:24:16 +02:00
Uli Schlachter 688b4fb628 textbox: Prefix internal variables with "_"
This makes sure that textbox.text = "foo" doesn't work at all. It was never
supposed to work anyway. Sorry that I break stuff again.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-07 14:22:44 +02:00
Uli Schlachter 650b3d6df5 Progressbar: Fix border
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-07 13:52:32 +02:00
Uli Schlachter 734973c60c Graph: Fix border and geometry
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-07 13:50:44 +02:00
Uli Schlachter af8fd15a8f client_unmanage(): Handle destroyed windows
When we receive a DestroyNotify, we have to unmanage the client. However, we
were just informed that the window was destroyed, so it doesn't make sense to
try to do "something" with the window.

This commits fixes some errors from the X server (which we ignored, but still
they are gone now).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-07 12:05:43 +02:00
Uli Schlachter 547f732b00 systray: Automatically fit into available space
Instead of having to set the systray's base size by hand, it now automatically
uses min(avail_width, avail_height) as its base size. That's way less surprising
for people.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-07 11:54:45 +02:00
Uli Schlachter 35c05abe29 Systray: Fix some flickering
Every time the systray was updated, we reparented the systray window to its
drawin. However, when the systray was already reparented, this still caused it
to be unmapped and mapped again.

So, we only should reparent the systray when we have to, and not always just for
the lulz.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-07 11:53:24 +02:00
Uli Schlachter 7edabc39fd awful.tooltip: Fix for new widget layouts
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-07 11:11:48 +02:00
Uli Schlachter 9d4e5d31bf awful.widget.layout: Remove
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-07 11:07:25 +02:00
Uli Schlachter 5eed35b7e0 awful.menu: Make sure the arrow is always visible
By setting the textbox in an align layout's middle, the submenu icon will always
get the space it needs and the textbox will get the rest. Previously, the
textbox took as much as it wanted and the image got the rest. This looked ugly.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-07 10:15:29 +02:00
Uli Schlachter bb975a2464 awful.prompt: Fix for the new textbox
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 21:27:42 +02:00
Uli Schlachter 6b972ffde0 widgets: Add mouse::{enter,leave} signals
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 21:17:05 +02:00
Uli Schlachter 3bfcf4594e Event handling: Don't reorder mouse handling
For performance reasons, we only handle the last motion notify we receive.
However, we must make sure that the motion isn't moved after enter or leave
notifies. Else, breakage is ensured!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 21:14:10 +02:00
Uli Schlachter 82ef539513 Luadoc: Fixage for the wibox -> drawin move
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 20:49:30 +02:00
Uli Schlachter 4af11b821c Whoops, fix wibox signals
emit_signal() already adds the object as the first argument, so we don't have to
add it ourselves.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 20:46:11 +02:00
Uli Schlachter 18799f32f8 Emit mouse::move signals when we get a motionnotify
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 20:44:22 +02:00
Uli Schlachter ae8567bef3 Color: Remove alpha, it is unused
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 20:18:24 +02:00
Uli Schlachter 0e819f2328 xcolor: Rename to color
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 20:14:19 +02:00
Uli Schlachter 2c52bc7001 Color: Remove, we are only using xcolor now
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 20:12:57 +02:00
Uli Schlachter e12212855b orientation: Remove
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 20:10:29 +02:00
Uli Schlachter 9deafe68c8 Font: Remove, oopango took over the job
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 20:09:17 +02:00
Uli Schlachter b3ebab0a7e draw: Remove some now-unused stuff
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 20:06:49 +02:00
Uli Schlachter 6826e5dfc4 Remove globalconf.colors
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 20:01:44 +02:00
Uli Schlachter ebcda492a1 wibox.layout.fixed: Always draw "empty" widgets
If a widget has a width/height of 0, we can safely draw it without running out
of the available space. This code checks if we got enough space after we now how
much space the next widget wants.

This fixes the systray. It has to be drawn at least once so that the C core can
set up stuff correctly. However, thanks to the systray having a width of 0, it
wasn't drawn by the layout.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 19:47:34 +02:00
Uli Schlachter 1fab3aa745 wibox.layout.align: Bugfix
It didn't correctly attach to its second and third widget's widget::updated
signal.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 19:46:47 +02:00
Uli Schlachter 27d448bc97 awful.widget.common: Add background to the icon
The icon should get the same background everything else gets. Fix this by making
the background the outer-most widget in each item.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 18:45:50 +02:00
Uli Schlachter 01aa7e66e6 wibox.widget.background: Use draw_widget()
Without draw_widget(), the input handling is broken.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 18:45:13 +02:00
Uli Schlachter 661a8a7b38 Some more minor fixes, make "strict" happy
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 16:27:38 +02:00
Uli Schlachter c271ed7b13 tasklist: Use a fixed layout
We need a fixed layout here to make tag names like "media" work. Without this,
every take would get the same space, no matter how long its name is.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 15:48:50 +02:00
Uli Schlachter 58bf0b0c64 wibox.layout.fixed: Fix typo
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 15:48:50 +02:00
Uli Schlachter 742c0dead0 Systray: Fix
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 15:38:44 +02:00
Uli Schlachter bddecffe97 Be compatible to oopango 1.0
Some idiot broke the API in oopango git. Work-around this by checking which
version of oopango we have.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 15:11:20 +02:00
Uli Schlachter 9b40f19f5c rc.lua: Port to new widget layouts
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 14:32:41 +02:00
Uli Schlachter b55dc20319 awful.widget.textclock: Port to new widget system
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 14:30:45 +02:00
Uli Schlachter 0cb3569e3e awful.widget.layoutbox: Port to new widget system
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 14:30:00 +02:00
Uli Schlachter 3b9150f05a awful.widget.button: Port to new widget layout
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 14:28:43 +02:00
Uli Schlachter 1b134b2361 lua.widget.prompt: Port to new widget system
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 14:27:16 +02:00
Uli Schlachter bf23ebdf46 graph,progressbar: Port to new widget system
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 14:25:59 +02:00
Uli Schlachter 97ed5e70b8 {task,tag}list: Port to new widget system
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 14:23:36 +02:00