summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2007-08-24 09:24:25 +0200
committerDanny Baumann <dannybaumann@web.de>2007-08-24 09:24:25 +0200
commit31cad698b53b2614b5cc49eb944f21c595d48778 (patch)
tree6bc3551fdca35ae43a6b0ae98f3cff6d73e336ec
parent316a500decc943def173183e3cce87debf427c05 (diff)
downloadwinrules-31cad698b53b2614b5cc49eb944f21c595d48778.tar.gz
winrules-31cad698b53b2614b5cc49eb944f21c595d48778.tar.bz2
Remove widget functionality.
The widget plugin now has functionality to include windows that don't have the widget hint set into the widget layer, so having this functionality in winrules as well duplicates the functionality.
-rw-r--r--winrules.c50
-rw-r--r--winrules.xml.in10
2 files changed, 0 insertions, 60 deletions
diff --git a/winrules.c b/winrules.c
index e4cf3e9..0fed99e 100644
--- a/winrules.c
+++ b/winrules.c
@@ -34,7 +34,6 @@
#define WINRULES_SCREEN_OPTION_BELOW_MATCH 3
#define WINRULES_SCREEN_OPTION_STICKY_MATCH 4
#define WINRULES_SCREEN_OPTION_FULLSCREEN_MATCH 5
-#define WINRULES_SCREEN_OPTION_WIDGET_MATCH 6
#define WINRULES_SCREEN_OPTION_NOMOVE_MATCH 7
#define WINRULES_SCREEN_OPTION_NORESIZE_MATCH 8
#define WINRULES_SCREEN_OPTION_NOMINIMIZE_MATCH 9
@@ -55,7 +54,6 @@ typedef struct _WinrulesWindow {
unsigned int allowedActions;
unsigned int stateSetMask;
unsigned int protocolSetMask;
- Bool widgetSet;
Bool firstMap;
} WinrulesWindow;
@@ -201,37 +199,6 @@ winrulesUpdateState (CompWindow *w,
}
static void
-winrulesUpdateWidget (CompWindow *w)
-{
- Atom compizWidget = XInternAtom (w->screen->display->display,
- "_COMPIZ_WIDGET",
- FALSE);
-
- WINRULES_SCREEN (w->screen);
- WINRULES_WINDOW (w);
-
- if (matchEval
- (&ws->opt[WINRULES_SCREEN_OPTION_WIDGET_MATCH].value.match, w))
- {
- if (w->inShowDesktopMode || w->mapNum ||
- w->attrib.map_state == IsViewable || w->minimized)
- {
- if (w->minimized || w->inShowDesktopMode)
- unminimizeWindow (w);
- XChangeProperty (w->screen->display->display, w->id, compizWidget,
- XA_STRING, 8, PropModeReplace,
- (unsigned char *)(int[]){-2}, 1);
- ww->widgetSet = TRUE;
- }
- }
- else if (ww->widgetSet)
- {
- XDeleteProperty (w->screen->display->display, w->id, compizWidget);
- ww->widgetSet = FALSE;
- }
-}
-
-static void
winrulesSetAllowedActions (CompWindow *w,
int optNum,
int action)
@@ -532,19 +499,6 @@ winrulesSetScreenOption (CompPlugin *plugin,
return TRUE;
}
break;
- case WINRULES_SCREEN_OPTION_WIDGET_MATCH:
- if (compSetMatchOption (o, value))
- {
- for (w = screen->windows; w; w = w->next)
- {
- if (!w->type & WINRULES_TARGET_WINDOWS)
- continue;
-
- winrulesUpdateWidget (w);
- }
- return TRUE;
- }
- break;
case WINRULES_SCREEN_OPTION_SIZE_MATCHES:
if (compSetOptionList (o, value))
{
@@ -610,8 +564,6 @@ winrulesHandleEvent (CompDisplay *d,
WINRULES_SCREEN_OPTION_FULLSCREEN_MATCH,
CompWindowStateFullscreenMask);
- winrulesUpdateWidget (w);
-
winrulesSetAllowedActions (w,
WINRULES_SCREEN_OPTION_NOMOVE_MATCH,
CompWindowActionMoveMask);
@@ -709,7 +661,6 @@ static const CompMetadataOptionInfo winrulesScreenOptionInfo[] = {
{ "below_match", "match", 0, 0, 0 },
{ "sticky_match", "match", 0, 0, 0 },
{ "fullscreen_match", "match", 0, 0, 0 },
- { "widget_match", "match", 0, 0, 0 },
{ "no_move_match", "match", 0, 0, 0 },
{ "no_resize_match", "match", 0, 0, 0 },
{ "no_minimize_match", "match", 0, 0, 0 },
@@ -786,7 +737,6 @@ winrulesInitWindow (CompPlugin *p,
return FALSE;
}
- ww->widgetSet = FALSE;
ww->stateSetMask = 0;
ww->protocolSetMask = 0;
diff --git a/winrules.xml.in b/winrules.xml.in
index 9305033..63edb43 100644
--- a/winrules.xml.in
+++ b/winrules.xml.in
@@ -4,11 +4,6 @@
<_short>Window Rules</_short>
<_long>Set windows rules</_long>
<category>Window Management</category>
- <deps>
- <relation type="before">
- <plugin>widget</plugin>
- </relation>
- </deps>
<screen>
<group>
<_short>Matches</_short>
@@ -42,11 +37,6 @@
<_long>Fullscreen windows</_long>
<default/>
</option>
- <option name="widget_match" type="match">
- <_short>Widget</_short>
- <_long>Set window as widget</_long>
- <default/>
- </option>
<option name="no_move_match" type="match">
<_short>Non movable windows</_short>
<_long>Set window as non movable</_long>