Fix for omnipresent AppIcon bug at startup
commit7857f297eae5c487a43d7fb525bf2ed7a8010ad4
authorDaniel Déchelotte <yo.dan@free.fr>
Tue, 1 Sep 2009 22:05:46 +0000 (2 00:05 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Tue, 1 Sep 2009 22:17:27 +0000 (2 00:17 +0200)
tree57e3025333cb88934b2ef76cbb866719f4520247
parentb37e065252a396020642f854797753071036c4d8
Fix for omnipresent AppIcon bug at startup

    Bug overview: right after start up, omnipresent AppIcons (living in the Clip)
    are displayed but non-functionnal.

    How to reproduce it: place two AppIcons in the Clip, make the first one (A)
    omnipresent and leave the second one (B) as is. Make the Clip "autocollapse".
    Switch to the second workspace and restart wmaker. Wmaker starts in the first
    workspace; the Clip is closed (its text color corresponds to the closed state,
    AppIcon B is not shown). However, AppIcon A is displayed.  Moreover, A does
    not react when the Clip expands or collapses.  Finally, a click on A makes it
    disappear. Fortunately, changing to another workspace fixes the problem
    definitively.

    Explanation and correction: internally, wmaker maintains as many clips as
    workspaces. When the user switches to another workspace, the omnipresent
    AppIcons are moved to the new "current" clip. In the situation above (trying
    to reproduce the bug), when wmaker restarts, the omnipresent AppIcons are
    restored in the second workspace, whereas the first workspace is active. In
    the previous code, a "hack" (calling XMapWindow()) unconditionally displayed
    the omnipresent AppIcons. The proposed patch makes sure the omnipresent
    AppIcons are moved to the first workspace on wmaker startup.
src/workspace.c