summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Riedi <andrewriedi@gmail.com>2007-07-26 02:15:31 -0700
committerAndrew Riedi <andrewriedi@gmail.com>2007-07-26 02:15:31 -0700
commit59da1da39e09e2362fffca69b07e30bf08632809 (patch)
tree5c4263aa1b9b6f6a20a3de97b2a34dba919e4584
parente35218cd826aaf1bd38093733368df7f57aca6a6 (diff)
downloadworkarounds-59da1da39e09e2362fffca69b07e30bf08632809.tar.gz
workarounds-59da1da39e09e2362fffca69b07e30bf08632809.tar.bz2
Add the Java fix.
-rw-r--r--workarounds.c21
-rw-r--r--workarounds.xml.in7
2 files changed, 27 insertions, 1 deletions
diff --git a/workarounds.c b/workarounds.c
index 5d7c32f..ef24c08 100644
--- a/workarounds.c
+++ b/workarounds.c
@@ -124,6 +124,27 @@ workaroundsWindowAddNotify (CompWindow *w)
}
}
+ /* FIXME: Basic hack to get Java windows working correctly. */
+ if (workaroundsGetJavaFix (w->screen->display) && !appliedFix && w->resName)
+ {
+ if ((strcmp (w->resName, "sun-awt-X11-XMenuWindow") == 0) ||
+ (strcmp (w->resName, "sun-awt-X11-XWindowPeer") == 0))
+ {
+ w->wmType = CompWindowTypeDropdownMenuMask;
+ appliedFix = TRUE;
+ }
+ else if (strcmp (w->resName, "sun-awt-X11-XDialogPeer") == 0)
+ {
+ w->wmType = CompWindowTypeDialogMask;
+ appliedFix = TRUE;
+ }
+ else if (strcmp (w->resName, "sun-awt-X11-XFramePeer") == 0)
+ {
+ w->wmType = CompWindowTypeNormalMask;
+ appliedFix = TRUE;
+ }
+ }
+
recalcWindowType (w);
if (workaroundsGetLegacyFullscreen (w->screen->display))
diff --git a/workarounds.xml.in b/workarounds.xml.in
index 9a9fac7..16b2e60 100644
--- a/workarounds.xml.in
+++ b/workarounds.xml.in
@@ -22,7 +22,12 @@
<_short>Notification Daemon Fix</_short>
<_long>Fix window type of notification daemon windows.</_long>
<default>true</default>
- </option>
+ </option>
+ <option type="bool" name="java_fix">
+ <_short>Java Window Fix</_short>
+ <_long>Fix window type of various Java windows.</_long>
+ <default>true</default>
+ </option>
</display>
<screen>
</screen>