commit
d497cdf081
|
@ -1241,8 +1241,19 @@ HANDLE_GEOM(height)
|
|||
xcb_get_property_reply(globalconf.connection, startup_id_q, NULL);
|
||||
/* Say spawn that a client has been started, with startup id as argument */
|
||||
char *startup_id = xutil_get_text_property_from_reply(reply);
|
||||
c->startup_id = startup_id;
|
||||
p_delete(&reply);
|
||||
|
||||
if (startup_id == NULL && c->leader_window != XCB_NONE) {
|
||||
/* GTK hides this property elsewhere. No idea why. */
|
||||
startup_id_q = xcb_get_property(globalconf.connection, false,
|
||||
c->leader_window, _NET_STARTUP_ID,
|
||||
XCB_GET_PROPERTY_TYPE_ANY, 0, UINT_MAX);
|
||||
reply = xcb_get_property_reply(globalconf.connection, startup_id_q, NULL);
|
||||
startup_id = xutil_get_text_property_from_reply(reply);
|
||||
p_delete(&reply);
|
||||
}
|
||||
c->startup_id = startup_id;
|
||||
|
||||
spawn_start_notify(c, startup_id);
|
||||
|
||||
luaA_class_emit_signal(L, &client_class, "list", 0);
|
||||
|
|
|
@ -3,7 +3,7 @@ local spawn = require("awful.spawn")
|
|||
-- This file provide a simple, yet flexible, test client.
|
||||
-- It is used to test the `awful.rules`
|
||||
|
||||
return function(class, title)
|
||||
return function(class, title, use_sn)
|
||||
title = title or 'Awesome test client'
|
||||
|
||||
local cmd = {"lua" , "-e", table.concat {
|
||||
|
@ -28,5 +28,5 @@ return function(class, title)
|
|||
"app:run {''}"
|
||||
}}
|
||||
|
||||
spawn(cmd)
|
||||
return spawn(cmd, use_sn)
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
--- Tests for spawn's startup notifications.
|
||||
|
||||
local runner = require("_runner")
|
||||
local spawn = require("awful.spawn")
|
||||
local test_client = require("_client")
|
||||
|
||||
local manage_called, c_snid
|
||||
|
||||
|
@ -15,7 +15,7 @@ local ret, snid
|
|||
local steps = {
|
||||
function(count)
|
||||
if count == 1 then
|
||||
ret, snid = spawn('urxvt', true)
|
||||
ret, snid = test_client("foo", "bar", true)
|
||||
elseif manage_called then
|
||||
assert(ret)
|
||||
assert(snid)
|
||||
|
@ -29,7 +29,7 @@ local steps = {
|
|||
function(count)
|
||||
if count == 1 then
|
||||
manage_called = false
|
||||
ret, snid = spawn('urxvt', false)
|
||||
ret, snid = test_client("bar", "foo", false)
|
||||
elseif manage_called then
|
||||
assert(ret)
|
||||
assert(snid == nil)
|
||||
|
|
Loading…
Reference in New Issue