At Fri, 06 Mar 2009 09:38:05 +0100
Tassilo Horn wrote:
> Hi all,
>
> I have this function which should toggle the tag i of screen scr to the
> currently focussed client.
>
> --8<---------------cut here---------------start------------->8---
> function add_client_tag_by_number (i, scr)
> if not scr then
> scr = client.focus.screen
> end
> if client.focus and tags[scr][i] then
> io.write("Adding client to tag ", i, " on screen ", scr, "\n")
> io.flush()
> awful.client.toggletag(tags[scr][i], client.focus)
> end
> end
> --8<---------------cut here---------------end--------------->8---
>
> It does work if scr is not given and so the screen of the currently
> focussed client is used. But when trying to tag the client with a tag
> on another screen, it does nothing.
>
> Let's say I'm on screen 1 add tag 2 to the current client, then
>
> Adding client to tag 2 on screen 1
>
> is written to stdout. When I call the function to add tag 2 on screen 2
> to the client, I get
>
> Adding client to tag 2 on screen 2
>
> so my function seems to do the right thing and there's a bug in
> awful.client.toggletag(). I use 3.4_rc4.
>
> Bye,
> Tassilo
>
>
That's no bug in awful.client.toggletag(). A client can only appear on one
screen at a time. You should make sure only one of those two tags can be seen
simultaneously and then change c.screen accordingly. This is because else you
could show both of the tags at the same time, which would require X11 to draw
the client on two different positions at the same time, which is not possible.
That's no limitation of awesome alone, it's a limitation of the X window system.
--
GCS/IT/M d- s+:- a--- C++ UL+++ US UB++ P+++ L+++ E--- W+ N+ o--
K- w--- O M-- V PS+ PE- Y+ PGP+++ t+ 5 X+ R tv+ b++ DI+++ D+++ G+
e- h! r y+
Gregor Best
signature.asc
Description: PGP signature
