Pardon me, that patch had some debug stuff left in it. I attached a version without that cruft.
--
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
From 96e3d85baab17f44236d4ab6e1b2ceb9ce3e29b2 Mon Sep 17 00:00:00 2001 From: Gregor Best <[email protected]> Date: Mon, 13 Jul 2009 01:13:21 +0200 Subject: [PATCH] awful.layout: also arrange on client tag change Signed-off-by: Gregor Best <[email protected]> --- lib/awful/layout/init.lua.in | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/awful/layout/init.lua.in b/lib/awful/layout/init.lua.in index 7cabfbc..d730a0b 100644 --- a/lib/awful/layout/init.lua.in +++ b/lib/awful/layout/init.lua.in @@ -10,11 +10,14 @@ local type = type local tag = require("awful.tag") local util = require("awful.util") local suit = require("awful.layout.suit") -local client = require("awful.client") local wibox = require("awful.wibox") local ascreen = require("awful.screen") -local capi = { screen = screen } local hooks = require("awful.hooks") +local capi = { + screen = screen, + client = client +} +local client = require("awful.client") --- Layout module for awful module("awful.layout") @@ -140,5 +143,13 @@ hooks.clients.register(function() end end) hooks.tags.register(function(screen, tag, action) on_arrange(screen) end) +hooks.tagged.register(function(c, tag) + if not tag.screen then return end + on_arrange(tag.screen) + if not capi.client.focus or not client.focus:isvisible() then + local c = client.focus.history.get(tag.screen, 0) + if c then capi.client.focus = c end + end +end) -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 -- 1.6.3.3
pgpWdVbeZFYKT.pgp
Description: PGP signature
