summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@opencompositing.org>2008-04-10 15:42:45 +0200
committerDennis kasprzyk <onestone@opencompositing.org>2008-04-10 15:42:45 +0200
commitd42fd833fdf348d4b8a797503809dbc50afd3eae (patch)
tree26aa12c5833ee2855331470dc8c37bfd971ec1aa
parentd0ac8f65584bbbf5f2a73111557683457edebf50 (diff)
parentd4a647f089282b4e7ac347ae263a3a8fcf9cf8ab (diff)
downloadwinrules-d42fd833fdf348d4b8a797503809dbc50afd3eae.tar.gz
winrules-d42fd833fdf348d4b8a797503809dbc50afd3eae.tar.bz2
Merge branch 'master' of git+ssh://git.opencompositing.org/git/fusion/plugins/winrules
-rw-r--r--winrules.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/winrules.c b/winrules.c
index 505f270..8e36dfd 100644
--- a/winrules.c
+++ b/winrules.c
@@ -57,6 +57,7 @@ typedef struct _WinrulesWindow {
unsigned int stateSetMask;
unsigned int protocolSetMask;
+ Bool oldInputHint;
Bool hasAlpha;
} WinrulesWindow;
@@ -146,22 +147,24 @@ winrulesSetNoFocus (CompWindow *w,
{
if (w->protocols & CompWindowProtocolTakeFocusMask)
{
- newProtocol = w->protocols & ~CompWindowProtocolTakeFocusMask;
- ww->protocolSetMask |= CompWindowProtocolTakeFocusMask;
- w->inputHint = FALSE;
+ ww->protocolSetMask |= (w->protocols &
+ CompWindowProtocolTakeFocusMask);
+ newProtocol = w->protocols & ~CompWindowProtocolTakeFocusMask;
+ ww->oldInputHint = w->inputHint;
+ w->inputHint = FALSE;
}
}
- else if (ww->protocolSetMask & CompWindowProtocolTakeFocusMask)
+ else if (ww->oldInputHint ||
+ (ww->protocolSetMask & CompWindowProtocolTakeFocusMask))
{
- newProtocol = w->protocols & CompWindowProtocolTakeFocusMask;
+ newProtocol = w->protocols |
+ (ww->protocolSetMask & CompWindowProtocolTakeFocusMask);
ww->protocolSetMask &= ~CompWindowProtocolTakeFocusMask;
- w->inputHint = TRUE;
+ w->inputHint = ww->oldInputHint;
}
if (newProtocol != w->protocols)
- winrulesSetProtocols (w->screen->display,
- w->protocols,
- w->id);
+ winrulesSetProtocols (w->screen->display, newProtocol, w->id);
}
static void
@@ -717,7 +720,8 @@ winrulesInitWindow (CompPlugin *p,
ww->allowedActions = ~0;
- ww->hasAlpha = w->alpha;
+ ww->hasAlpha = w->alpha;
+ ww->oldInputHint = w->inputHint;
w->base.privates[ws->windowPrivateIndex].ptr = ww;