[beryl-commits] compiz mirror: Changes to 'master' (f45d42091df09d0d2585e0657c93fe2a14832ac9)
compiz at server.beryl-project.org
compiz at server.beryl-project.org
Tue Jun 5 22:31:15 CEST 2007
New commits:
commit f45d42091df09d0d2585e0657c93fe2a14832ac9
Author: David Reveman <davidr at novell.com>
Date: Tue Jun 5 16:29:01 2007 -0400
Terminated scale mode when edge is triggered while
already in scale mode.
commit 7c724c66febd7ee6101565a25faa84f22c0a00d5
Author: David Reveman <davidr at novell.com>
Date: Tue Jun 5 16:05:13 2007 -0400
Clean up.
commit 502f37ba3c77939a91576fcb774157f95af77dc3
Author: David Reveman <davidr at novell.com>
Date: Tue Jun 5 16:03:20 2007 -0400
Minor cleanup.
commit 1afca98587add45b707647228edf8f86e3e8a7f6
Author: Quinn Storm <quinn at quinn-laptop.(none)>
Date: Sat Jun 2 23:21:16 2007 -0400
add option to turn off scale behaviour where a click on the desktop shows the desktop
metadata/scale.xml.in | 7 ++++++-
plugins/scale.c | 35 +++++++++++++++++++++++++++++++----
2 files changed, 37 insertions(+), 5 deletions(-)
Modified: compiz/metadata/scale.xml.in
===================================================================
--- compiz/metadata/scale.xml.in
+++ compiz/metadata/scale.xml.in
@@ -33,6 +33,11 @@
<default>
</default>
</option>
+ <option name="show_desktop" type="bool">
+ <_short>Click Desktop to Show Desktop</_short>
+ <_long>Enter Show Desktop mode when Desktop is clicked during Scale</_long>
+ <default>true</default>
+ </option>
</display>
<screen>
<option name="spacing" type="int">
@@ -77,7 +82,7 @@
</option>
<option name="overlay_icon" type="int">
<_short>Overlay Icon</_short>
- <_long>Overlay an icon on windows once they are scaled</_long>
+ <_long>Overlay an icon on windows once they are scaled</_long>
<min>0</min>
<max>2</max>
<default>1</default>
Modified: compiz/plugins/scale.c
===================================================================
--- compiz/plugins/scale.c
+++ compiz/plugins/scale.c
@@ -34,6 +34,8 @@
#include <compiz.h>
+#define EDGE_STATE (CompActionStateInitEdge)
+
#define WIN_X(w) ((w)->attrib.x - (w)->input.left)
#define WIN_Y(w) ((w)->attrib.y - (w)->input.top)
#define WIN_W(w) ((w)->width + (w)->input.left + (w)->input.right)
@@ -63,7 +65,8 @@ typedef struct _ScaleSlot {
#define SCALE_DISPLAY_OPTION_INITIATE_ALL 1
#define SCALE_DISPLAY_OPTION_INITIATE_GROUP 2
#define SCALE_DISPLAY_OPTION_INITIATE_OUTPUT 3
-#define SCALE_DISPLAY_OPTION_NUM 4
+#define SCALE_DISPLAY_OPTION_SHOW_DESKTOP 4
+#define SCALE_DISPLAY_OPTION_NUM 5
typedef struct _ScaleDisplay {
int screenPrivateIndex;
@@ -1179,6 +1182,11 @@ scaleInitiate (CompDisplay *d,
ss->type = ScaleTypeNormal;
return scaleInitiateCommon (s, action, state, option, nOption);
}
+ else if ((state & EDGE_STATE) && ss->state == SCALE_STATE_WAIT)
+ {
+ if (ss->type == ScaleTypeNormal)
+ return scaleTerminate (s->display, action, 0, option, nOption);
+ }
}
return FALSE;
@@ -1206,6 +1214,11 @@ scaleInitiateAll (CompDisplay *d,
ss->type = ScaleTypeAll;
return scaleInitiateCommon (s, action, state, option, nOption);
}
+ else if ((state & EDGE_STATE) && ss->state == SCALE_STATE_WAIT)
+ {
+ if (ss->type == ScaleTypeAll)
+ return scaleTerminate (s->display, action, 0, option, nOption);
+ }
}
return FALSE;
@@ -1242,6 +1255,11 @@ scaleInitiateGroup (CompDisplay *d,
return scaleInitiateCommon (s, action, state, option, nOption);
}
}
+ else if ((state & EDGE_STATE) && ss->state == SCALE_STATE_WAIT)
+ {
+ if (ss->type == ScaleTypeGroup)
+ return scaleTerminate (s->display, action, 0, option, nOption);
+ }
}
return FALSE;
@@ -1269,6 +1287,11 @@ scaleInitiateOutput (CompDisplay *d,
ss->type = ScaleTypeOutput;
return scaleInitiateCommon (s, action, state, option, nOption);
}
+ else if ((state & EDGE_STATE) && ss->state == SCALE_STATE_WAIT)
+ {
+ if (ss->type == ScaleTypeOutput)
+ return scaleTerminate (s->display, action, 0, option, nOption);
+ }
}
return FALSE;
@@ -1535,8 +1558,11 @@ scaleHandleEvent (CompDisplay *d,
event->xbutton.y_root < (s->workArea.y +
s->workArea.height))
{
- scaleTerminate (d, action, 0, &o, 1);
- (*s->enterShowDesktopMode) (s);
+ if (sd->opt[SCALE_DISPLAY_OPTION_SHOW_DESKTOP].value.b)
+ {
+ scaleTerminate (d, action, 0, &o, 1);
+ (*s->enterShowDesktopMode) (s);
+ }
}
}
}
@@ -1743,7 +1769,8 @@ static const CompMetadataOptionInfo scaleDisplayOptionInfo[] = {
{ "initiate", "action", 0, scaleInitiate, scaleTerminate },
{ "initiate_all", "action", 0, scaleInitiateAll, scaleTerminate },
{ "initiate_group", "action", 0, scaleInitiateGroup, scaleTerminate },
- { "initiate_output", "action", 0, scaleInitiateOutput, scaleTerminate }
+ { "initiate_output", "action", 0, scaleInitiateOutput, scaleTerminate },
+ { "show_desktop", "bool", 0, 0, 0 }
};
static Bool
More information about the commits
mailing list