summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/cube.c
diff options
context:
space:
mode:
authorxsacha <xsacha@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-09 05:38:27 +0000
committerxsacha <xsacha@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-09 05:38:27 +0000
commit71fa79441a319cca262fa78c9a599c47e267ba20 (patch)
treed913a79049afdb6bf9a78eab7dda05cde9573be4 /beryl-plugins/src/cube.c
parent02e5374d736972377bbaa50cfa5aba3172a9d5fa (diff)
downloadmarex-dev-71fa79441a319cca262fa78c9a599c47e267ba20.tar.gz
marex-dev-71fa79441a319cca262fa78c9a599c47e267ba20.tar.bz2
beryl-plugins: 3d: Sticky windows no longer transformed when Stick to Screen option enabled in Desktop Cube. IPCS stickyAtom added.
git-svn-id: file:///beryl/trunk@3835 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/cube.c')
-rw-r--r--beryl-plugins/src/cube.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/beryl-plugins/src/cube.c b/beryl-plugins/src/cube.c
index 12757d6..31ba10d 100644
--- a/beryl-plugins/src/cube.c
+++ b/beryl-plugins/src/cube.c
@@ -77,6 +77,7 @@ char *multiMonitorModes[] = {
#define NUM_MULTIMONITOR_MODES 2
#define CUBE_IN_DEFAULT FALSE
+#define STICKY_SCREEN_DEFAULT FALSE
static char *cubeImages[] = {
IMAGEDIR "/cubecaps.png"
@@ -267,6 +268,7 @@ typedef struct _CubeScreen
int mmModeAtom;
int insideAtom;
+ int stickyAtom;
int snapTopBottomAtom;
float desktopOpacity;
@@ -1127,8 +1129,14 @@ cubeSetScreenOption(CompScreen * screen, char *name, CompOptionValue * value)
return TRUE;
}
break;
- case CUBE_SCREEN_OPTION_TRANSPARENT:
case CUBE_SCREEN_OPTION_STUCK_TO_SCREEN:
+ if (compSetBoolOption(o, value))
+ {
+ IPCS_SetBool(IPCS_OBJECT(screen), cs->stickyAtom, o->value.b);
+ return TRUE;
+ }
+ break;
+ case CUBE_SCREEN_OPTION_TRANSPARENT:
case CUBE_SCREEN_OPTION_CAP_TRANSPARENT:
case CUBE_SCREEN_OPTION_VIEWPORT_SLIDE:
case CUBE_TRANSPARENT_MANUALONLY:
@@ -1456,7 +1464,7 @@ static void cubeScreenInitOptions(CubeScreen * cs)
o->shortDesc = N_("Stick Sticky Windows to Screen");
o->longDesc = N_("Cause dock and sticky windows to be drawn stuck to the screen instead of the Cube.");
o->type = CompOptionTypeBool;
- o->value.b = FALSE;
+ o->value.b = STICKY_SCREEN_DEFAULT;
o = &cs->opt[CUBE_SCREEN_OPTION_CAP_TRANSPARENT];
o->advanced = False;
@@ -3050,6 +3058,9 @@ static Bool cubeInitScreen(CompPlugin * p, CompScreen * s)
cs->insideAtom = IPCS_GetAtom(IPCS_OBJECT(s), IPCS_BOOL, "INSIDE", TRUE);
IPCS_SetBool(IPCS_OBJECT(s), cs->insideAtom, CUBE_IN_DEFAULT);
+ cs->stickyAtom = IPCS_GetAtom(IPCS_OBJECT(s), IPCS_BOOL, "STICKY", TRUE);
+ IPCS_SetBool(IPCS_OBJECT(s), cs->stickyAtom, STICKY_SCREEN_DEFAULT);
+
addScreenAction(s, &cd->opt[CUBE_DISPLAY_OPTION_UNFOLD].value.action);
cs->desktopOpacity = OPAQUE;