Added option to select primary display on tray_output

This commit is contained in:
Jose Pereira
2012-04-01 15:07:15 +01:00
committed by Michael Stapelberg
parent 206b96202c
commit 9a58c1fcaa
5 changed files with 29 additions and 10 deletions

View File

@ -450,9 +450,12 @@ static void handle_client_message(xcb_client_message_event_t* event) {
SLIST_FOREACH(walk, outputs, slist) {
if (!walk->active)
continue;
if (config.tray_output &&
strcasecmp(walk->name, config.tray_output) != 0)
continue;
if (config.tray_output) {
if ((strcasecmp(walk->name, config.tray_output) != 0) &&
(!walk->primary || strcasecmp("primary", config.tray_output) != 0))
continue;
}
DLOG("using output %s\n", walk->name);
output = walk;
}