Skip to content

Commit

Permalink
Merge pull request #14 from ad1217/urgentFix
Browse files Browse the repository at this point in the history
Remove workspace urgent flag only when i3 removes it. Fixes #13
  • Loading branch information
Denes Botond committed May 21, 2015
2 parents 6999491 + 90488ed commit 36d6dd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
1 change: 0 additions & 1 deletion panel-plugin/i3w-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ on_workspace_focused(i3workspace *workspace, gpointer data)
{
i3WorkspacesPlugin *i3_workspaces = (i3WorkspacesPlugin *) data;

workspace->urgent = FALSE; // reset the urgent flag
GtkWidget *button = i3_workspaces->buttons[workspace->num];
set_button_label(button, workspace, i3_workspaces->config);
}
Expand Down
11 changes: 4 additions & 7 deletions panel-plugin/i3wm-delegate.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,13 +512,10 @@ on_urgent_workspace(i3windowManager *i3wm)
for (listItem = workspacesList; listItem != NULL; listItem = listItem->next)
{
i3ipcWorkspaceReply * workspaceReply = (i3ipcWorkspaceReply *) listItem->data;
if (workspaceReply->urgent)
{
i3workspace *workspace = i3wm->workspaces[workspaceReply->num];
workspace->urgent = TRUE;
if (i3wm->on_workspace_urgent)
i3wm->on_workspace_urgent(workspace, i3wm->on_workspace_urgent_data);
}
i3workspace *workspace = i3wm->workspaces[workspaceReply->num];
workspace->urgent = workspaceReply->urgent;
if (i3wm->on_workspace_urgent)
i3wm->on_workspace_urgent(workspace, i3wm->on_workspace_urgent_data);
}

g_slist_free_full(workspacesList, (GDestroyNotify)i3ipc_workspace_reply_free);
Expand Down

0 comments on commit 36d6dd9

Please sign in to comment.