Commit 16cda4ba authored by Sebastian Geiger's avatar Sebastian Geiger Committed by Marco Trevisan

util: allow setting the same client type again
parent 6ddcd454
......@@ -636,6 +636,11 @@ static WnckClientType client_type = 0;
* tasklists, it is important to set the role to %WNCK_CLIENT_TYPE_PAGER for
* libwnck to properly work.
* This function should only be called once per program. Additional calls
* with the same client type will be silently ignored. An attempt to change
* the client type to a differnet value after it has already been set will
* be ignored and a critical warning will be logged.
* Since: 2.14
......@@ -644,8 +649,8 @@ wnck_set_client_type (WnckClientType ewmh_sourceindication_client_type)
/* Clients constantly switching types makes no sense; this should only be
* set once.
if (client_type != 0)
g_critical ("wnck_set_client_type got called multiple times.\n");
if (client_type != 0 && client_type != ewmh_sourceindication_client_type)
g_critical ("wnck_set_client_type: changing the client type is not supported.\n");
client_type = ewmh_sourceindication_client_type;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment