Hello, I wrote a small patch for the session plugin which solves a problem I had. I use current Compiz from GIT in a KDE 4.1 environment. But when I enable session management, the Plasma workspace gets messed up (seems to appear in front of other windows). This is more a workaround than a real fix, but it works for me :) So I added the capability to session to exclude windows from management by a normal match.
I am not subscribed to the list, so please CC me for comments.
Regards
Malte
---
metadata/session.xml.in | 5 +++++
src/session/session.c | 11 +++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/metadata/session.xml.in b/metadata/session.xml.in
index ab5def0..d88b0f4 100644
--- a/metadata/session.xml.in
+++ b/metadata/session.xml.in
@@ -14,6 +14,11 @@
<_long>Also try to save and restore legacy apps that don't
support the X session management protocol. This setting only should be used in
KDE, as only KDE's session manager also saves those applications.</_long>
<default>false</default>
</option>
+ <option name="ignore_match" type="match">
+ <_short>Windows to ignore</_short>
+ <_long>Matching windows will not be handled by the sessoin
plugin</_long>
+ <default/>
+ </option>
</display>
</plugin>
</compiz>
diff --git a/src/session/session.c b/src/session/session.c
index bc99f71..7ff4c86 100644
--- a/src/session/session.c
+++ b/src/session/session.c
@@ -39,7 +39,8 @@
#include <libxml/xpath.h>
#define SESSION_DISPLAY_OPTION_SAVE_LEGACY 0
-#define SESSION_DISPLAY_OPTION_NUM 1
+#define SESSION_DISPLAY_OPTION_IGNORE_MATCH 1
+#define SESSION_DISPLAY_OPTION_NUM 2
typedef struct _SessionWindowList
{
@@ -344,6 +345,11 @@ isSessionWindow (CompWindow *w)
if (sessionGetIsEmbedded (w->screen->display, w->id))
return FALSE;
+ SESSION_DISPLAY (w->screen->display);
+
+ if (matchEval (&sd->opt[SESSION_DISPLAY_OPTION_IGNORE_MATCH].value.match,
w))
+ return FALSE;
+
return TRUE;
}
@@ -926,7 +932,8 @@ sessionSetObjectOption (CompPlugin *plugin,
}
static const CompMetadataOptionInfo sessionDisplayOptionInfo[] = {
- { "save_legacy", "bool", 0, 0, 0 }
+ { "save_legacy", "bool", 0, 0, 0 },
+ { "ignore_match", "match", 0, 0, 0 }
};
static int
--
1.6.0.2
signature.asc
Description: PGP signature
_______________________________________________ Dev mailing list [email protected] http://lists.compiz-fusion.org/mailman/listinfo/dev
