summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2008-10-08 20:47:32 +0200
committerDanny Baumann <dannybaumann@web.de>2008-10-08 20:47:32 +0200
commit527ab570fff89bba9f9a0e0b7fb31ac23acf5aff (patch)
tree3ab7abd8ed8d9981fbbfcda049dba4f583484a2d
parent151f8a63d72727d4981fef25714bcad15a5bb4b5 (diff)
downloadworkarounds-527ab570fff89bba9f9a0e0b7fb31ac23acf5aff.tar.gz
workarounds-527ab570fff89bba9f9a0e0b7fb31ac23acf5aff.tar.bz2
Revert "Added option for hiding Utility windows from taskbar."
This reverts commit 151f8a63d72727d4981fef25714bcad15a5bb4b5. A much better alternative to that option is to set "type=Utility" in the skip_taskbar option of winrules.
-rw-r--r--workarounds.c75
-rw-r--r--workarounds.xml.in5
2 files changed, 25 insertions, 55 deletions
diff --git a/workarounds.c b/workarounds.c
index 42a6e00..0e0f9a1 100644
--- a/workarounds.c
+++ b/workarounds.c
@@ -63,10 +63,11 @@ typedef struct _WorkaroundsScreen {
CompScreen *currentScreen = NULL;
typedef struct _WorkaroundsWindow {
- unsigned int adjustedState;
- Bool adjustedWinType;
- Bool madeFullscreen;
- Bool isFullscreen;
+ Bool adjustedWinType;
+ Bool madeSticky;
+ Bool madeFullscreen;
+ Bool isFullscreen;
+ Bool madeDemandAttention;
} WorkaroundsWindow;
#define GET_WORKAROUNDS_DISPLAY(d) \
@@ -237,6 +238,16 @@ workaroundsGetWindowRoleAtom (CompWindow *w)
}
static void
+workaroundsRemoveSticky (CompWindow *w)
+{
+ WORKAROUNDS_WINDOW (w);
+
+ if (w->state & CompWindowStateStickyMask && ww->madeSticky)
+ changeWindowState (w, w->state & ~CompWindowStateStickyMask);
+ ww->madeSticky = FALSE;
+}
+
+static void
workaroundsUpdateSticky (CompWindow *w)
{
WORKAROUNDS_WINDOW (w);
@@ -252,41 +263,12 @@ workaroundsUpdateSticky (CompWindow *w)
{
if (!(w->state & CompWindowStateStickyMask))
{
- ww->adjustedState |= CompWindowStateStickyMask;
+ ww->madeSticky = TRUE;
changeWindowState (w, w->state | CompWindowStateStickyMask);
}
}
- else if (ww->adjustedState & CompWindowStateStickyMask)
- {
- ww->adjustedState &= ~CompWindowStateStickyMask;
- changeWindowState (w, w->state & ~CompWindowStateStickyMask);
- }
-}
-
-static void
-workaroundsCheckUtilityHandling (CompWindow *w)
-{
- WORKAROUNDS_WINDOW (w);
-
- if (!(w->wmType & CompWindowTypeUtilMask))
- return;
-
- if (workaroundsGetUtilitySkipTaskbar (w->screen->display))
- {
- ww->adjustedState |= CompWindowStateSkipTaskbarMask |
- CompWindowStateSkipPagerMask;
- changeWindowState (w, w->state |
- CompWindowStateSkipTaskbarMask |
- CompWindowStateSkipPagerMask);
- }
- else if (ww->adjustedState & CompWindowStateSkipTaskbarMask)
- {
- ww->adjustedState &= ~(CompWindowStateSkipTaskbarMask |
- CompWindowStateSkipPagerMask);
-
- changeWindowState (w, w->state & ~(CompWindowStateSkipTaskbarMask |
- CompWindowStateSkipPagerMask));
- }
+ else
+ workaroundsRemoveSticky (w);
}
static void
@@ -308,12 +290,12 @@ updateUrgencyState (CompWindow *w)
if (urgent)
{
- ww->adjustedState |= CompWindowStateDemandsAttentionMask;
+ ww->madeDemandAttention = TRUE;
changeWindowState (w, w->state | CompWindowStateDemandsAttentionMask);
}
- else if (ww->adjustedState & CompWindowStateDemandsAttentionMask)
+ else if (ww->madeDemandAttention)
{
- ww->adjustedState &= ~CompWindowStateDemandsAttentionMask;
+ ww->madeDemandAttention = FALSE;
changeWindowState (w, w->state & ~CompWindowStateDemandsAttentionMask);
}
}
@@ -553,10 +535,7 @@ workaroundsDisplayOptionChanged (CompDisplay *d,
{
ws = GET_WORKAROUNDS_SCREEN (s, GET_WORKAROUNDS_DISPLAY (d));
for (w = s->windows; w; w = w->next)
- {
- workaroundsCheckUtilityHandling (w);
workaroundsUpdateSticky (w);
- }
workaroundsUpdateParameterFix (s);
if (workaroundsGetFglrxXglFix (d))
s->copySubBuffer = NULL;
@@ -589,7 +568,6 @@ workaroundsHandleEvent (CompDisplay *d,
if (w)
{
workaroundsUpdateSticky (w);
- workaroundsCheckUtilityHandling (w);
workaroundsDoFixes (w);
workaroundsFixupFullscreen (w);
}
@@ -785,10 +763,11 @@ workaroundsInitWindow (CompPlugin *plugin, CompWindow *w)
if (!ww)
return FALSE;
- ww->adjustedState = 0;
+ ww->madeSticky = FALSE;
ww->adjustedWinType = FALSE;
ww->isFullscreen = FALSE;
ww->madeFullscreen = FALSE;
+ ww->madeDemandAttention = FALSE;
w->base.privates[ws->windowPrivateIndex].ptr = ww;
@@ -809,13 +788,9 @@ workaroundsFiniWindow (CompPlugin *plugin, CompWindow *w)
recalcWindowActions (w);
}
- if (ww->adjustedState)
- {
+ if (w->state & CompWindowStateStickyMask && ww->madeSticky)
setWindowState (w->screen->display,
- w->state & ~ww->adjustedState, w->id);
- recalcWindowType (w);
- recalcWindowActions (w);
- }
+ w->state & ~CompWindowStateStickyMask, w->id);
}
free (ww);
diff --git a/workarounds.xml.in b/workarounds.xml.in
index 11cbb06..6dae654 100644
--- a/workarounds.xml.in
+++ b/workarounds.xml.in
@@ -43,11 +43,6 @@
<_long>Make "urgent" windows also "demand attention".</_long>
<default>false</default>
</option>
- <option type="bool" name="utility_skip_taskbar">
- <_short>Hide Utility Windows From Taskbar</_short>
- <_long>Make Utility windows not being shown in pagers and task bars.</_long>
- <default>false</default>
- </option>
<option type="bool" name="aiglx_fragment_fix">
<_short>AIGLX Fragment Parameter Fix</_short>
<_long>Fix broken glProgramEnvParameter4f implementation.</_long>