At 1228404579 time_t, Gregor Best wrote:
> diff --git a/lib/awful/mouse.lua.in b/lib/awful/mouse.lua.in
> index a9443f2..c9da833 100644
> --- a/lib/awful/mouse.lua.in
> +++ b/lib/awful/mouse.lua.in
> @@ -9,6 +9,7 @@ local layout = require("awful.layout")
> local tag = require("awful.tag")
> local hooks = require("awful.hooks")
> local aclient = require("awful.client")
> +local widget = require("awful.widget")
> local type = type
> local math = math
> local ipairs = ipairs
> @@ -154,6 +155,15 @@ function client.move(c, snap)
> return true
> end
> end
> + local w = widget_under_pointer()
> + local tags = capi.screen[c.screen]:tags()
> + for i, t in
> ipairs(widget.taglist.tags[c.screen]) do
> + if t == w then
> + aclient.movetotag(tags[i], c)
> + break
> + end
> + end
> + widget.taglist.tags[c.screen].selected = nil
> return false
> end, "fleur")
> end
I see several problems:
- you need to be very precise with your mouse. The actual move should be
done when you release the mouse button *over* a tag, not when the
mouse is over it.
- having this in the same function of the client move may be a problem.
I'd rather see another function which can be used with or without the
client moving.
> diff --git a/lib/awful/widget.lua.in b/lib/awful/widget.lua.in
> index 20f2b39..5eb5b9e 100644
> --- a/lib/awful/widget.lua.in
> +++ b/lib/awful/widget.lua.in
> @@ -29,6 +29,7 @@ module("awful.widget")
> -- Various public structures
> taglist = {}
> taglist.label = {}
> +taglist.tags = {}
Private data must be local.
> tasklist = {}
> tasklist.label = {}
>
> @@ -38,6 +39,7 @@ tasklist.label = {}
> -- @param buttons A table with buttons binding to set.
> function taglist.new(scr, label, buttons)
> local w = {}
> + taglist.tags[scr] = { }
That does not allow to have several taglist by screen, which is a bad
design.
I think an weak otable with the widgets as key as the tag as value would
be enough.
Cheers,
--
Julien Danjou
// ᐰ <[EMAIL PROTECTED]> http://julien.danjou.info
// 9A0D 5FD9 EB42 22F6 8974 C95C A462 B51E C2FE E5CD
signature.asc
Description: Digital signature
