Update to awesome-3.5.9

This commit is contained in:
dcoppa 2016-03-07 11:33:59 +00:00
parent 73db3f2369
commit fa12cb9cfc
9 changed files with 7 additions and 455 deletions

View File

@ -1,9 +1,8 @@
# $OpenBSD: Makefile,v 1.99 2016/03/01 11:42:24 dcoppa Exp $
# $OpenBSD: Makefile,v 1.100 2016/03/07 11:33:59 dcoppa Exp $
COMMENT= highly configurable framework window manager
DISTNAME= awesome-3.5.8
REVISION= 0
DISTNAME= awesome-3.5.9
EXTRACT_SUFX= .tar.xz
CATEGORIES= x11

View File

@ -1,2 +1,2 @@
SHA256 (awesome-3.5.8.tar.xz) = fDDJbFe9cs/tYwu8zDRAVP5Es3wKeb3ZgHXFB69nLsY=
SIZE (awesome-3.5.8.tar.xz) = 723000
SHA256 (awesome-3.5.9.tar.xz) = x/i15FeHUWiNcOyMQQxVMW4ivKjsEZXGIidPH3JU1k8=
SIZE (awesome-3.5.9.tar.xz) = 723084

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-awesome_c,v 1.16 2016/03/01 11:42:24 dcoppa Exp $
$OpenBSD: patch-awesome_c,v 1.17 2016/03/07 11:33:59 dcoppa Exp $
commit 635223b5fe599d94de4ab44d27500041f121e081
Author: Uli Schlachter <psychon@znc.in>
@ -12,24 +12,8 @@ Hopefully, this fixes floating clients moving around across a restart.
Signed-off-by: Uli Schlachter <psychon@znc.in>
commit bf73f78eea61d4a0e93e5da5e6d89e1bdca2e816
Author: Uli Schlachter <psychon@znc.in>
Date: Wed Feb 17 18:40:01 2016 +0100
Check that the Lua stack is empty in the main loop
The Lua stack is a finite resource and everything that pushes something there
should also clean up. This is not a problem for functions that are called by
Lua, because their "stack frame" is freed when they return. However, in global
context, Lua does not and cannot automatically clean up for us. Thus, it makes
sense to print a warning in this case.
(Additionally, this cleans up the stack if something is left)
Signed-off-by: Uli Schlachter <psychon@znc.in>
--- awesome.c.orig Sat Jan 30 14:55:18 2016
+++ awesome.c Tue Mar 1 11:24:18 2016
--- awesome.c.orig Fri Jan 15 16:51:19 2016
+++ awesome.c Mon Jan 18 09:47:55 2016
@@ -89,6 +89,13 @@ awesome_atexit(bool restart)
globalconf.screen->root,
AWESOME_CLIENT_ORDER, XCB_ATOM_WINDOW, 32, n, wins);
@ -44,17 +28,3 @@ Signed-off-by: Uli Schlachter <psychon@znc.in>
a_dbus_cleanup();
systray_cleanup();
@@ -284,6 +291,13 @@ a_glib_poll(GPollFD *ufds, guint nfsd, gint timeout)
/* Do all deferred work now */
awesome_refresh();
+
+ /* Check if the Lua stack is the way it should be */
+ if (lua_gettop(globalconf.L) != 0) {
+ warn("Something was left on the Lua stack, this is a bug!");
+ luaA_dumpstack(globalconf.L);
+ lua_settop(globalconf.L, 0);
+ }
/* Check how long this main loop iteration took */
gettimeofday(&now, NULL);

View File

@ -1,33 +0,0 @@
$OpenBSD: patch-common_luaobject_c,v 1.1 2016/03/01 11:42:24 dcoppa Exp $
commit 89a29b540426feefc8546cd47fc60a7d9e49f3f0
Author: Uli Schlachter <psychon@znc.in>
Date: Wed Feb 17 19:07:06 2016 +0100
Fix arguments to luaL_checkstack()
The argument to luaL_checkstack() is the amount of new stack to make available,
not the new size of the stack. Thus, remove the addition of lua_gettop(L) here.
Signed-off-by: Uli Schlachter <psychon@znc.in>
--- common/luaobject.c.orig Sat Jan 30 14:55:18 2016
+++ common/luaobject.c Tue Mar 1 11:24:18 2016
@@ -218,7 +218,7 @@ signal_object_emit(lua_State *L, signal_array_t *arr,
if(sigfound)
{
int nbfunc = sigfound->sigfuncs.len;
- luaL_checkstack(L, lua_gettop(L) + nbfunc + nargs + 1, "too much signal");
+ luaL_checkstack(L, nbfunc + nargs + 1, "too much signal");
/* Push all functions and then execute, because this list can change
* while executing funcs. */
foreach(func, sigfound->sigfuncs)
@@ -263,7 +263,7 @@ luaA_object_emit_signal(lua_State *L, int oud,
if(sigfound)
{
int nbfunc = sigfound->sigfuncs.len;
- luaL_checkstack(L, lua_gettop(L) + nbfunc + nargs + 2, "too much signal");
+ luaL_checkstack(L, nbfunc + nargs + 2, "too much signal");
/* Push all functions and then execute, because this list can change
* while executing funcs. */
foreach(func, sigfound->sigfuncs)

View File

@ -1,55 +0,0 @@
$OpenBSD: patch-event_c,v 1.15 2016/03/01 11:42:24 dcoppa Exp $
commit a181bee46533f92d573f7a4622391ae58320cda8
Author: Uli Schlachter <psychon@znc.in>
Date: Wed Feb 17 18:52:35 2016 +0100
Fix unbalance Lua stack usage in event_handle_leavenotify()
Commit 42e00819584c removed a call to lua_pop(L,1) that was still necessary.
This commit adds that call again.
Fixes: https://github.com/awesomeWM/awesome/issues/703
Signed-off-by: Uli Schlachter <psychon@znc.in>
commit e54d911a94697eb5fd5b7d5ac2a72e4d3be6194b
Author: Uli Schlachter <psychon@znc.in>
Date: Sun Feb 28 13:29:25 2016 +0100
Make client key bindings for e.g. xeyes work again
Instead of focusing the root window, we now create a "focus window" inside of
our frame window. This window is placed so that it is not visible, but we can
grab key bindings on it to simulate the window having the input focus.
Fixes: https://github.com/awesomeWM/awesome/issues/699
Signed-off-by: Uli Schlachter <psychon@znc.in>
--- event.c.orig Sat Jan 30 14:55:18 2016
+++ event.c Tue Mar 1 11:24:18 2016
@@ -507,6 +507,7 @@ event_handle_leavenotify(xcb_leave_notify_event_t *ev)
{
luaA_object_push(globalconf.L, c);
luaA_object_emit_signal(globalconf.L, -1, "mouse::leave", 0);
+ lua_pop(globalconf.L, 1);
}
lua_pushnil(globalconf.L);
@@ -644,7 +645,7 @@ event_handle_key(xcb_key_press_event_t *ev)
/* get keysym ignoring all modifiers */
xcb_keysym_t keysym = keyresolv_get_keysym(ev->detail, 0);
client_t *c;
- if((c = client_getbywin(ev->event)))
+ if((c = client_getbywin(ev->event)) || (c = client_getbynofocuswin(ev->event)))
{
luaA_object_push(globalconf.L, c);
event_key_callback(ev, &c->keys, -1, 1, &keysym);
@@ -835,6 +836,8 @@ event_handle_mappingnotify(xcb_mapping_notify_event_t
client_t *c = *_c;
xcb_ungrab_key(globalconf.connection, XCB_GRAB_ANY, c->window, XCB_BUTTON_MASK_ANY);
xwindow_grabkeys(c->window, &c->keys);
+ if (c->nofocus_window)
+ xwindow_grabkeys(c->nofocus_window, &c->keys);
}
}
}

View File

@ -1,41 +0,0 @@
$OpenBSD: patch-lib_awful_ewmh_lua_in,v 1.1 2016/03/01 11:42:24 dcoppa Exp $
commit 9d34f2dc030a2bb95ad1e3d9ffdd27b9da039419
Author: Uli Schlachter <psychon@znc.in>
Date: Mon Feb 15 21:15:41 2016 +0100
Fix awful.ewmh to handle window gravities
Since commit b2aaefd095c964491f2c93a, we correctly handle window gravities when
the border width of a client changes. Since most windows out there have a
NorthWest gravity, this means that most windows do not have this problem.
However, e.g. mplayer uses gravity "Static" and this causes this issue (any
gravity other than NorthWest will do).
This affects the fullscreen handling in awful.ewmh. The code has to set the
border width before it changes a client's geometry so that the move when the
border width changes doesn't matter.
No new integration test for this since I didn't find anything usable with a
non-NorthWest gravity. A test would be easy to write, just test if `c.fullscreen
= true ; c.fullscreen = false` restores the previous window geometry.
Fixes: https://github.com/awesomeWM/awesome/issues/697
Signed-off-by: Uli Schlachter <psychon@znc.in>
--- lib/awful/ewmh.lua.in.orig Sat Jan 30 14:55:18 2016
+++ lib/awful/ewmh.lua.in Tue Mar 1 11:24:18 2016
@@ -66,11 +66,11 @@ local function fullscreen(window, set)
store_geometry(window, "fullscreen")
data[window].fullscreen.border_width = window.border_width
local g = screen[window.screen].geometry
- window:geometry(screen[window.screen].geometry)
window.border_width = 0
+ window:geometry(screen[window.screen].geometry)
elseif data[window] and data[window].fullscreen then
- window:geometry(data[window].fullscreen)
window.border_width = data[window].fullscreen.border_width
+ window:geometry(data[window].fullscreen)
end
end

View File

@ -1,86 +0,0 @@
$OpenBSD: patch-luaa_c,v 1.5 2016/03/01 11:42:24 dcoppa Exp $
commit 333cfaf0a580c78ad92c7215dc46517b4c349e62
Author: Uli Schlachter <psychon@znc.in>
Date: Wed Feb 17 19:03:48 2016 +0100
Balance the stack in luaA_loadrc()
In various conditions, luaA_loadrc() left luaA_dofunction_on_error and an error
message on the Lua stack. Also, it used LUA_MULTRET without looking at the
return values. Fix all of this and reorder the code a bit to make it easier to
follow.
Signed-off-by: Uli Schlachter <psychon@znc.in>
--- luaa.c.orig Sat Jan 30 14:55:18 2016
+++ luaa.c Tue Mar 1 11:24:18 2016
@@ -498,39 +498,40 @@ luaA_startup_error(const char *err)
static bool
luaA_loadrc(const char *confpath, bool run)
{
- if(!luaL_loadfile(globalconf.L, confpath))
+ if(luaL_loadfile(globalconf.L, confpath))
{
- if(run)
- {
- /* Set the conffile right now so it can be used inside the
- * configuration file. */
- conffile = a_strdup(confpath);
- /* Move error handling function before function */
- lua_pushcfunction(globalconf.L, luaA_dofunction_on_error);
- lua_insert(globalconf.L, -2);
- if(lua_pcall(globalconf.L, 0, LUA_MULTRET, -2))
- {
- const char *err = lua_tostring(globalconf.L, -1);
- luaA_startup_error(err);
- fprintf(stderr, "%s\n", err);
- /* An error happened, so reset this. */
- conffile = NULL;
- }
- else
- return true;
- }
- else
- {
- lua_pop(globalconf.L, 1);
- return true;
- }
- }
- else
- {
const char *err = lua_tostring(globalconf.L, -1);
luaA_startup_error(err);
fprintf(stderr, "%s\n", err);
+ return false;
}
+
+ if(!run)
+ {
+ lua_pop(globalconf.L, 1);
+ return true;
+ }
+
+ /* Set the conffile right now so it can be used inside the
+ * configuration file. */
+ conffile = a_strdup(confpath);
+ /* Move error handling function before function */
+ lua_pushcfunction(globalconf.L, luaA_dofunction_on_error);
+ lua_insert(globalconf.L, -2);
+ if(!lua_pcall(globalconf.L, 0, 0, -2))
+ {
+ /* Pop luaA_dofunction_on_error */
+ lua_pop(globalconf.L, 1);
+ return true;
+ }
+
+ const char *err = lua_tostring(globalconf.L, -1);
+ luaA_startup_error(err);
+ fprintf(stderr, "%s\n", err);
+ /* An error happened, so reset this. */
+ conffile = NULL;
+ /* Pop luaA_dofunction_on_error() and the error message */
+ lua_pop(globalconf.L, 2);
return false;
}

View File

@ -1,168 +0,0 @@
$OpenBSD: patch-objects_client_c,v 1.16 2016/03/01 11:42:24 dcoppa Exp $
commit 64748671cd8de154092be76e28b4a06080712d76
Author: Uli Schlachter <psychon@znc.in>
Date: Tue Feb 16 19:31:20 2016 +0100
Don't modify WM_HINTS in client_set_urgent()
To quote from ICCCM (_4.1.2): "The window manager will not change properties
written by the client."
We tried to do this anyway to update WM_HINTS so that the current urgency state
is reflected. Apparently, Chrome does a similar read-modify-set cycle and the
resulting race condition meant that the "accepts input" hint on Chromium's
window was permanently disabled.
This helps with https://github.com/awesomeWM/awesome/issues/670, but I still
think that Chrome shouldn't try to implement "please don't focus me when I do
the following" by temporarily claiming "please don't ever focus me".
Signed-off-by: Uli Schlachter <psychon@znc.in>
commit e54d911a94697eb5fd5b7d5ac2a72e4d3be6194b
Author: Uli Schlachter <psychon@znc.in>
Date: Sun Feb 28 13:29:25 2016 +0100
Make client key bindings for e.g. xeyes work again
Instead of focusing the root window, we now create a "focus window" inside of
our frame window. This window is placed so that it is not visible, but we can
grab key bindings on it to simulate the window having the input focus.
Fixes: https://github.com/awesomeWM/awesome/issues/699
Signed-off-by: Uli Schlachter <psychon@znc.in>
commit dfe44a15711eef0c236cea48c0ab30ec6bf764a3
Author: Uli Schlachter <psychon@znc.in>
Date: Thu Feb 4 18:21:25 2016 +0100
Always send ConfigureNotifies
ICCCM specifies when the WM has to send a ConfigureNotify. Java does not care
and wants one all the time. Meh.
Fixes: #248
Signed-off-by: Uli Schlachter <psychon@znc.in>
--- objects/client.c.orig Sat Jan 30 14:55:18 2016
+++ objects/client.c Tue Mar 1 11:24:18 2016
@@ -71,22 +71,8 @@ client_set_urgent(lua_State *L, int cidx, bool urgent)
if(c->urgent != urgent)
{
- xcb_get_property_cookie_t hints =
- xcb_icccm_get_wm_hints_unchecked(globalconf.connection, c->window);
-
c->urgent = urgent;
- /* update ICCCM hints */
- xcb_icccm_wm_hints_t wmh;
- xcb_icccm_get_wm_hints_reply(globalconf.connection, hints, &wmh, NULL);
-
- if(urgent)
- wmh.flags |= XCB_ICCCM_WM_HINT_X_URGENCY;
- else
- wmh.flags &= ~XCB_ICCCM_WM_HINT_X_URGENCY;
-
- xcb_icccm_set_wm_hints(globalconf.connection, c->window, &wmh);
-
luaA_object_emit_signal(L, cidx, "property::urgent", 0);
}
}
@@ -178,6 +164,16 @@ client_getbywin(xcb_window_t w)
return NULL;
}
+client_t *
+client_getbynofocuswin(xcb_window_t w)
+{
+ foreach(c, globalconf.clients)
+ if((*c)->nofocus_window == w)
+ return *c;
+
+ return NULL;
+}
+
/** Get a client by its frame window.
* \param w The client window to find.
* \return A client pointer if found, NULL otherwise.
@@ -340,6 +336,20 @@ client_focus(client_t *c)
globalconf.focus.need_update = true;
}
+static xcb_window_t
+client_get_nofocus_window(client_t *c)
+{
+ if (c->nofocus_window == XCB_NONE) {
+ c->nofocus_window = xcb_generate_id(globalconf.connection);
+ xcb_create_window(globalconf.connection, globalconf.default_depth, c->nofocus_window, c->frame_window,
+ -2, -2, 1, 1, 0, XCB_COPY_FROM_PARENT, globalconf.visual->visual_id,
+ 0, NULL);
+ xcb_map_window(globalconf.connection, c->nofocus_window);
+ xwindow_grabkeys(c->nofocus_window, &c->keys);
+ }
+ return c->nofocus_window;
+}
+
void
client_focus_refresh(void)
{
@@ -358,11 +368,7 @@ client_focus_refresh(void)
if(!c->nofocus)
win = c->window;
else
- /* Move the focus away from whatever has it to make sure the
- * previously focused client doesn't get any input in case
- * WM_TAKE_FOCUS gets ignored.
- */
- win = globalconf.focus.window_no_focus;
+ win = client_get_nofocus_window(c);
if(client_hasproto(c, WM_TAKE_FOCUS))
xwindow_takefocus(c->window);
@@ -741,13 +747,18 @@ client_resize_do(client_t *c, area_t geometry, bool fo
bool send_notice = force_notice;
bool hide_titlebars = c->fullscreen;
screen_t *new_screen = screen_getbycoord(geometry.x, geometry.y);
+ bool java_is_broken = true;
if (honor_hints)
geometry = client_apply_size_hints(c, geometry);
if(c->geometry.width == geometry.width
&& c->geometry.height == geometry.height)
+ /* We are moving without changing the size, see ICCCM 4.2.3 */
send_notice = true;
+ if(java_is_broken)
+ /* Java strong. Java Hulk. Java make own rules! */
+ send_notice = true;
/* Also store geometry including border */
area_t old_geometry = c->geometry;
@@ -779,7 +790,6 @@ client_resize_do(client_t *c, area_t geometry, bool fo
(uint32_t[]) { real_geometry.x, real_geometry.y, real_geometry.width, real_geometry.height });
if(send_notice)
- /* We are moving without changing the size, see ICCCM 4.2.3 */
client_send_configure(c);
client_restore_enterleave_events();
@@ -1236,6 +1246,8 @@ client_unmanage(client_t *c, bool window_valid)
/* Ignore all spurious enter/leave notify events */
client_ignore_enterleave_events();
+ if (c->nofocus_window != XCB_NONE)
+ xcb_destroy_window(globalconf.connection, c->nofocus_window);
xcb_destroy_window(globalconf.connection, c->frame_window);
client_restore_enterleave_events();
@@ -2285,6 +2297,8 @@ luaA_client_keys(lua_State *L)
luaA_object_emit_signal(L, 1, "property::keys", 0);
xcb_ungrab_key(globalconf.connection, XCB_GRAB_ANY, c->window, XCB_BUTTON_MASK_ANY);
xwindow_grabkeys(c->window, keys);
+ if (c->nofocus_window)
+ xwindow_grabkeys(c->nofocus_window, &c->keys);
}
return luaA_key_array_get(L, 1, keys);

View File

@ -1,34 +0,0 @@
$OpenBSD: patch-objects_client_h,v 1.7 2016/03/01 11:42:24 dcoppa Exp $
commit e54d911a94697eb5fd5b7d5ac2a72e4d3be6194b
Author: Uli Schlachter <psychon@znc.in>
Date: Sun Feb 28 13:29:25 2016 +0100
Make client key bindings for e.g. xeyes work again
Instead of focusing the root window, we now create a "focus window" inside of
our frame window. This window is placed so that it is not visible, but we can
grab key bindings on it to simulate the window having the input focus.
Fixes: https://github.com/awesomeWM/awesome/issues/699
Signed-off-by: Uli Schlachter <psychon@znc.in>
--- objects/client.h.orig Sat Jan 30 14:55:18 2016
+++ objects/client.h Tue Mar 1 11:24:18 2016
@@ -56,6 +56,8 @@ typedef enum {
struct client_t
{
WINDOW_OBJECT_HEADER
+ /** Window we use for input focus and no-input clients */
+ xcb_window_t nofocus_window;
/** Client logical screen */
screen_t *screen;
/** Client name */
@@ -137,6 +139,7 @@ LUA_OBJECT_FUNCS(client_class, client_t, client)
bool client_maybevisible(client_t *);
client_t * client_getbywin(xcb_window_t);
+client_t * client_getbynofocuswin(xcb_window_t);
client_t * client_getbyframewin(xcb_window_t);
void client_ban(client_t *);