Hi people,

the attached two patches fix two issues in the titlebar code. The first
one fixes the modkey assignment for titlebar buttons (thanks to
psychon for "strict.lua" btw :), the second one fixes an issue which
appeared on the user ml (a coding error, which led to titlebar.lua
failing).

-- 
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 cb91aba2f5588cba80dd56c03d225cbb16ce451f Mon Sep 17 00:00:00 2001
From: Gregor Best <g...@intepi.net>
Date: Tue, 4 Aug 2009 20:58:34 +0200
Subject: [PATCH 1/2] titlebar: fix modkey for buttons

Signed-off-by: Gregor Best <g...@intepi.net>
---
 lib/awful/titlebar.lua.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/awful/titlebar.lua.in b/lib/awful/titlebar.lua.in
index eb71a19..8b5649b 100644
--- a/lib/awful/titlebar.lua.in
+++ b/lib/awful/titlebar.lua.in
@@ -100,7 +100,7 @@ function add(c, args)
     local is = 1
     data[c].button_sets = {}
     for i = 1, #button_groups do
-        local set = button_groups[i].create(c, modkey, theme)
+        local set = button_groups[i].create(c, args.modkey, theme)
         if (set) then
             data[c].button_sets[is] = set
             is = is + 1
-- 
1.6.4

From 71e9ddfbdb5db883da476ba12d6d45e59be20392 Mon Sep 17 00:00:00 2001
From: Gregor Best <g...@intepi.net>
Date: Tue, 4 Aug 2009 21:04:32 +0200
Subject: [PATCH 2/2] titlebar: fix titlebar buttons

Signed-off-by: Gregor Best <g...@intepi.net>
---
 lib/awful/titlebar.lua.in |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/awful/titlebar.lua.in b/lib/awful/titlebar.lua.in
index 8b5649b..980559e 100644
--- a/lib/awful/titlebar.lua.in
+++ b/lib/awful/titlebar.lua.in
@@ -17,7 +17,7 @@ local capi =
     widget = widget,
     client = client,
 }
-local button = require("awful.button")
+local abutton = require("awful.button")
 local beautiful = require("beautiful")
 local hooks = require("awful.hooks")
 local util = require("awful.util")
@@ -81,9 +81,9 @@ function add(c, args)
 
     -- Redirect relevant events to the client the titlebar belongs to
     title.buttons = util.table.join(
-        button({ }, 1, button_callback_focus_raise_move),
-        button({ args.modkey }, 1, button_callback_move),
-        button({ args.modkey }, 3, button_callback_resize))
+        abutton({ }, 1, button_callback_focus_raise_move),
+        abutton({ args.modkey }, 1, button_callback_move),
+        abutton({ args.modkey }, 3, button_callback_resize))
 
     local appicon = capi.widget({ type = "imagebox" })
     appicon.image = c.icon
@@ -185,7 +185,7 @@ local function button_new(c, name, modkey, theme, state)
     local button = widget.button({ image = img })
     if not button then return end
 
-    button.buttons = util.table.join(button.buttons,  button({ }, 1, nil,  
state.action))
+    button.buttons = util.table.join(button.buttons,  abutton({ }, 1, nil,  
state.action))
 
     button.visible = false
     return button
-- 
1.6.4

Attachment: pgpH6092R4Raw.pgp
Description: PGP signature

Reply via email to