summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Frank Erikson <kristian@kristian-desktop.(none)>2008-12-07 20:54:28 +1300
committerKristian Frank Erikson <kristian@kristian-desktop.(none)>2008-12-07 20:54:28 +1300
commit9c3dca7e343dec5c768205d7fab6a8a30daae7a1 (patch)
treedb75990f614dc49cf93774eb00e580aab2c13e03
parent70b5e31e5cf69a5d61b1492143e5c500e5dc9dcf (diff)
downloadcf-squeeze-9c3dca7e343dec5c768205d7fab6a8a30daae7a1.tar.gz
cf-squeeze-9c3dca7e343dec5c768205d7fab6a8a30daae7a1.tar.bz2
Fixed the invisible cursor bug
-rw-r--r--squeeze.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/squeeze.c b/squeeze.c
index 34fd1f9..d6ec676 100644
--- a/squeeze.c
+++ b/squeeze.c
@@ -544,6 +544,21 @@ squeezePaintWindow (CompWindow *w,
return status;
}
+char* itoa(int val, int base){
+
+ static char buf[32] = {0};
+
+ int i = 30;
+
+ for(; val && i ; --i, val /= base)
+
+ buf[i] = "0123456789abcdef"[val % base];
+
+ return &buf[i+1];
+
+}
+
+
/*
* initiate action callback
*/
@@ -572,11 +587,19 @@ squeezeInitiateCommon (CompDisplay *d,
{
CompScreen *s = w->screen;
+ //Don't squeeze to windows that can't squeeze
+ // Core has a function that looks useful: minimizeWindow
+ if (w->type & (CompWindowTypeDesktopMask |
+ CompWindowTypeDockMask |
+ CompWindowTypeFullscreenMask))
+ return FALSE;
+
// Save window for resize window to find
sd->w = w;
SQUEEZE_SCREEN (s);
+
if (!ss->grabIndex)
{
/* this will keep squeeze from working while something
@@ -585,7 +608,7 @@ squeezeInitiateCommon (CompDisplay *d,
return FALSE;
/* we are ok, so grab the screen */
- ss->grabIndex = pushScreenGrab (s, s->invisibleCursor, "squeeze");
+ ss->grabIndex = pushScreenGrab (s, s->normalCursor, "squeeze");
}
if (ss->grabIndex)