Fixes from upstream:

Fix check against clients in taglist
(upstream git commit aedcd90d4da41132303636ba15170b6a43cc231f)

wibox.widget.systray: Special case the empty systray
(upstream git commit 3dd0c442a031f174000950981154139879933ab0)

systray: Small consistency fixes
(upstream git commit a250dcdbe12a3afa6ffa9fbb26f8c48c7e9cc049)
This commit is contained in:
dcoppa 2014-08-18 10:34:02 +00:00
parent c79b9f396d
commit df0679a805
5 changed files with 108 additions and 8 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.80 2014/05/13 07:31:52 dcoppa Exp $
# $OpenBSD: Makefile,v 1.81 2014/08/18 10:34:02 dcoppa Exp $
COMMENT= highly configurable framework window manager
DISTNAME= awesome-3.5.5
REVISION= 3
REVISION= 4
EXTRACT_SUFX= .tar.xz
CATEGORIES= x11
@ -70,7 +70,9 @@ pre-configure:
post-install:
@rm ${WRKINST}/${LOCALBASE}/share/awesome/lib/*.{beforesubst,orig} \
${WRKINST}/${LOCALBASE}/share/awesome/lib/awful/*.{beforesubst,orig} \
${WRKINST}/${LOCALBASE}/share/awesome/lib/awful/widget/*.orig \
${WRKINST}/${LOCALBASE}/share/awesome/lib/menubar/*.{beforesubst,orig} \
${WRKINST}/${LOCALBASE}/share/awesome/lib/wibox/widget/*.orig \
${WRKINST}/${LOCALBASE}/share/awesome/themes/default/*.{beforesubst,orig}
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/awesome
@mv ${WRKINST}/${SYSCONFDIR}/xdg/awesome/rc.lua \

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-awesomeConfig_cmake,v 1.13 2014/04/15 10:32:36 dcoppa Exp $
--- awesomeConfig.cmake.orig Sat Oct 12 18:48:49 2013
+++ awesomeConfig.cmake Tue Apr 15 11:42:58 2014
$OpenBSD: patch-awesomeConfig_cmake,v 1.14 2014/08/18 10:34:02 dcoppa Exp $
--- awesomeConfig.cmake.orig Fri Apr 11 11:07:10 2014
+++ awesomeConfig.cmake Mon Aug 18 12:06:33 2014
@@ -16,12 +16,11 @@ option(COMPRESS_MANPAGES "compress manpages" ON)
option(GENERATE_DOC "generate API documentation" ON)
@ -19,7 +19,17 @@ $OpenBSD: patch-awesomeConfig_cmake,v 1.13 2014/04/15 10:32:36 dcoppa Exp $
# }}}
# {{{ Endianness
@@ -53,19 +52,15 @@ a_find_program(ASCIIDOC_EXECUTABLE asciidoc FALSE)
@@ -43,9 +42,6 @@ macro(a_find_program var prg req)
endif()
endmacro()
-a_find_program(CAT_EXECUTABLE cat TRUE)
-a_find_program(LN_EXECUTABLE ln TRUE)
-a_find_program(GREP_EXECUTABLE grep TRUE)
a_find_program(GIT_EXECUTABLE git FALSE)
a_find_program(HOSTNAME_EXECUTABLE hostname FALSE)
# programs needed for man pages
@@ -53,19 +49,15 @@ a_find_program(ASCIIDOC_EXECUTABLE asciidoc FALSE)
a_find_program(XMLTO_EXECUTABLE xmlto FALSE)
a_find_program(GZIP_EXECUTABLE gzip FALSE)
# lua documentation
@ -42,7 +52,7 @@ $OpenBSD: patch-awesomeConfig_cmake,v 1.13 2014/04/15 10:32:36 dcoppa Exp $
# }}}
# {{{ Check if documentation can be build
@@ -189,7 +184,7 @@ else()
@@ -189,7 +181,7 @@ else()
endif()
# Error check
@ -51,7 +61,7 @@ $OpenBSD: patch-awesomeConfig_cmake,v 1.13 2014/04/15 10:32:36 dcoppa Exp $
message(FATAL_ERROR "lua library not found")
endif()
@@ -257,7 +252,7 @@ endif()
@@ -257,7 +249,7 @@ endif()
if(DEFINED AWESOME_MAN_PATH)
set(AWESOME_MAN_PATH ${AWESOME_MAN_PATH} CACHE PATH "awesome manpage directory")
else()

View File

@ -0,0 +1,31 @@
$OpenBSD: patch-lib_awful_widget_taglist_lua_in,v 1.1 2014/08/18 10:34:02 dcoppa Exp $
commit aedcd90d4da41132303636ba15170b6a43cc231f
Author: Jason Yan <tailofthesun@gmail.com>
Date: Fri May 9 00:18:46 2014 -0700
Fix check against clients in taglist.
--- lib/awful/widget/taglist.lua.in.orig Fri Apr 11 11:07:10 2014
+++ lib/awful/widget/taglist.lua.in Mon Aug 18 12:08:03 2014
@@ -51,6 +51,7 @@ function taglist.taglist_label(t, args)
local icon
local bg_resize = false
local is_selected = false
+ local cls = t:clients()
if t.selected then
bg_color = bg_focus
fg_color = fg_focus
@@ -69,11 +70,10 @@ function taglist.taglist_label(t, args)
end
end
end
- if t:clients() == 0 and t.selected and taglist_squares_sel_empty then
+ if #cls == 0 and t.selected and taglist_squares_sel_empty then
bg_image = taglist_squares_sel_empty
bg_resize = taglist_squares_resize == "true"
elseif not is_selected then
- local cls = t:clients()
if #cls > 0 then
if taglist_squares_unsel then
bg_image = taglist_squares_unsel

View File

@ -0,0 +1,22 @@
$OpenBSD: patch-lib_wibox_widget_systray_lua_in,v 1.1 2014/08/18 10:34:02 dcoppa Exp $
commit 3dd0c442a031f174000950981154139879933ab0
Author: Uli Schlachter <psychon@znc.in>
Date: Sun May 11 17:24:01 2014 +0200
wibox.widget.systray: Special case the empty systray
Otherwise we could end up with negative size for the systray.
--- lib/wibox/widget/systray.lua.in.orig Fri Apr 11 11:07:10 2014
+++ lib/wibox/widget/systray.lua.in Mon Aug 18 12:13:12 2014
@@ -46,6 +46,9 @@ end
function systray:fit(width, height)
local num_entries = capi.awesome.systray()
local base = base_size
+ if num_entries == 0 then
+ return 0, 0
+ end
if base == nil then
if width < height then
base = width

View File

@ -0,0 +1,35 @@
$OpenBSD: patch-systray_c,v 1.4 2014/08/18 10:34:02 dcoppa Exp $
commit a250dcdbe12a3afa6ffa9fbb26f8c48c7e9cc049
Author: Uli Schlachter <psychon@znc.in>
Date: Sun May 11 17:21:57 2014 +0200
systray: Small consistency fixes
Use lua's *integer instead of *number functions, because we are dealing with
integers. That is, "numbers which do not have a fractional part".
--- systray.c.orig Fri Apr 11 11:07:10 2014
+++ systray.c Mon Aug 18 12:26:29 2014
@@ -329,9 +329,9 @@ luaA_systray(lua_State *L)
{
size_t bg_len;
drawin_t *w = luaA_checkudata(L, 1, &drawin_class);
- int x = luaL_checknumber(L, 2);
- int y = luaL_checknumber(L, 3);
- int base_size = luaL_checknumber(L, 4);
+ int x = luaL_checkinteger(L, 2);
+ int y = luaL_checkinteger(L, 3);
+ int base_size = luaL_checkinteger(L, 4);
bool horiz = lua_toboolean(L, 5);
const char *bg = luaL_checklstring(L, 6, &bg_len);
bool revers = lua_toboolean(L, 7);
@@ -375,7 +375,7 @@ luaA_systray(lua_State *L)
globalconf.systray.window);
}
- lua_pushnumber(L, globalconf.embedded.len);
+ lua_pushinteger(L, globalconf.embedded.len);
luaA_object_push(L, globalconf.systray.parent);
return 2;
}