summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/trailfocus2.c
diff options
context:
space:
mode:
authorkristian <kristian@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-01-18 17:57:59 +0000
committerkristian <kristian@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-01-18 17:57:59 +0000
commit86dd23b2d1803a058cb6f548fc2acb774e3ce46a (patch)
treec6b5b2262bcd604bb83caae8f1db82b833ac3586 /beryl-plugins/src/trailfocus2.c
parent5ee00953e8bdff935d7627dce0ca3dce18a05b59 (diff)
downloadmarex-dev-86dd23b2d1803a058cb6f548fc2acb774e3ce46a.tar.gz
marex-dev-86dd23b2d1803a058cb6f548fc2acb774e3ce46a.tar.bz2
core:
- Split paint-locking into three so op/bri/sat is locked seperately. (Feel free to convert it to a mask instead of a struct). plugins: - trailfocus2 shouldn't have to worry about screengrabs any more. Removed the necesarry code. Slight adjustements. - opacify: Fix comments slight modifications. - move.c: Check against the actual opacity, not default opacity when checking if move should change the opacity of a window. git-svn-id: file:///beryl/trunk@2853 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/trailfocus2.c')
-rw-r--r--beryl-plugins/src/trailfocus2.c37
1 files changed, 3 insertions, 34 deletions
diff --git a/beryl-plugins/src/trailfocus2.c b/beryl-plugins/src/trailfocus2.c
index 89c3ee1..9c551ea 100644
--- a/beryl-plugins/src/trailfocus2.c
+++ b/beryl-plugins/src/trailfocus2.c
@@ -90,9 +90,7 @@ typedef struct _TrailfocusScreen
Window *win;
int win_max;
TfAttrib *inc;
- Bool needStackUpdate;
CompOption opt[SOPT_NUM];
- PreparePaintScreenProc preparePaintScreen;
} TrailfocusScreen;
/* Core trailfocus functions. These do the real work. ---------------*/
@@ -102,7 +100,8 @@ static Bool is_trailfocus_window(TrailfocusScreen * ts, CompWindow * w)
{
if (!(w->type & ts->wMask))
return False;
- if (w->defaultPaintLock)
+ if (w->defaultPaintLock.opacity && w->defaultPaintLock.saturation
+ && w->defaultPaintLock.brightness)
return False;
if (ts->opt[SOPT_IGNORE_SKIPTASKBAR].value.b
@@ -296,15 +295,7 @@ static void trailfocusHandleEvent(CompDisplay * d, XEvent * event)
case FocusIn:
s = push_window(d, event->xfocus.window);
if (s)
- {
- if (otherScreenGrabExist(s,0))
- {
- TRAILFOCUS_SCREEN(s);
- ts->needStackUpdate = TRUE;
- }
- else
- set_windows(s);
- }
+ set_windows(s);
break;
default:
break;
@@ -357,24 +348,6 @@ static void recalculate_attributes(TrailfocusScreen * ts)
// ts->inc[i+start] = min;
}
-/* check if we need to do a set_windows because the last one was blocked
- by a screen grab
- */
-static void trailfocusPreparePaintScreen(CompScreen * s, int msSinceLastPaint)
-{
- TRAILFOCUS_SCREEN(s);
-
- UNWRAP(ts, s, preparePaintScreen);
- (*s->preparePaintScreen) (s, msSinceLastPaint);
- WRAP(ts, s, preparePaintScreen, trailfocusPreparePaintScreen);
-
- if (ts->needStackUpdate && !otherScreenGrabExist(s, 0))
- {
- set_windows(s);
- ts->needStackUpdate = FALSE;
- }
-}
-
/* Unlike the traditional setScreenOptions, we return on failure in the
* switch, so we can execute a couple of common functions at the end.
*/
@@ -433,8 +406,6 @@ static void trailfocusFiniScreen(CompPlugin * p, CompScreen * s)
TRAILFOCUS_SCREEN(s);
bail_out_tf(s);
- UNWRAP(ts, s, preparePaintScreen);
-
if (ts->win)
free(ts->win);
if (ts->inc)
@@ -625,12 +596,10 @@ static Bool trailfocusInitScreen(CompPlugin * p, CompScreen * s)
s->privates[td->screenPrivateIndex].ptr = ts;
trailfocusScreenInitOptions(ts);
- WRAP(ts, s, preparePaintScreen, trailfocusPreparePaintScreen);
ts->wMask =
compWindowTypeMaskFromStringList(&ts->opt[SOPT_WINDOW_TYPE].
value);
- ts->needStackUpdate = FALSE;
recalculate_attributes(ts);
push_window(s->display, s->display->activeWindow);
set_windows(s);