SUGGESTED FIX
here is an output of "sccs diffs -b -C". Real diffs are attached.
------- XWM.java -------
*** /tmp/sccs.4L8jhr 2006-05-24 14:33:57.000000000 +0400
--- XWM.java 2006-05-24 14:29:53.000000000 +0400
***************
*** 63,68 ****
--- 63,71 ----
static XAtom XA_OL_DECOR_PIN = new XAtom();
static XAtom XA_OL_DECOR_CLOSE = new XAtom();
+ /* EWMH */
+ static XAtom XA_FRAME_EXTENTS = new XAtom();
+
final static int
UNDETERMINED_WM = 1,
NO_WM = 2,
***************
*** 74,80 ****
KDE2_WM = 8,
SAWFISH_WM = 9,
ICE_WM = 10,
! METACITY_WM = 11;
public String toString() {
switch (WMID) {
case NO_WM:
--- 77,84 ----
KDE2_WM = 8,
SAWFISH_WM = 9,
ICE_WM = 10,
! METACITY_WM = 11,
! COMPIZ_WM = 12;
public String toString() {
switch (WMID) {
case NO_WM:
***************
*** 97,102 ****
--- 101,108 ----
return "IceWM";
case METACITY_WM:
return "Metacity";
+ case COMPIZ_WM:
+ return "Compiz";
case UNDETERMINED_WM:
default:
return "Undetermined WM";
***************
*** 161,167 ****
{ XA_OL_DECOR_RESIZE, "_OL_DECOR_RESIZE" },
{ XA_OL_DECOR_PIN, "_OL_DECOR_PIN" },
{ XA_OL_DECOR_CLOSE, "_OL_DECOR_CLOSE" },
! { XA_MWM_HINTS, "_MOTIF_WM_HINTS" }
};
String[] names = new String[atomInitList.length];
--- 167,174 ----
{ XA_OL_DECOR_RESIZE, "_OL_DECOR_RESIZE" },
{ XA_OL_DECOR_PIN, "_OL_DECOR_PIN" },
{ XA_OL_DECOR_CLOSE, "_OL_DECOR_CLOSE" },
! { XA_MWM_HINTS, "_MOTIF_WM_HINTS" },
! { XA_FRAME_EXTENTS, "_NET_FRAME_EXTENTS" }
};
String[] names = new String[atomInitList.length];
***************
*** 431,436 ****
--- 438,447 ----
return isNetWMName("KWin");
}
+ static boolean isCompiz() {
+ return isNetWMName("compiz");
+ }
+
/*
* Is Metacity running?
*/
***************
*** 669,676 ****
awt_wmgr = XWM.SAWFISH_WM;
} else if (isKDE2()) {
awt_wmgr =XWM. KDE2_WM;
! } else
! if (doIsIceWM && isIceWM()) {
awt_wmgr = XWM.ICE_WM;
}
/*
--- 680,688 ----
awt_wmgr = XWM.SAWFISH_WM;
} else if (isKDE2()) {
awt_wmgr =XWM. KDE2_WM;
! } else if (isCompiz()) {
! awt_wmgr = XWM.COMPIZ_WM;
! } else if (doIsIceWM && isIceWM()) {
awt_wmgr = XWM.ICE_WM;
}
/*
***************
*** 1319,1324 ****
--- 1331,1339 ----
case XWM.ENLIGHTEN_WM:
return readInsetsArray(window, XA_E_FRAME_SIZE,
insets);
+ case XWM.COMPIZ_WM:
+ return readInsetsArray(window, XA_FRAME_EXTENTS,
+ insets);
default:
return false;
}
------- XDecoratedPeer.java -------
*** /tmp/sccs.OIrgSA 2006-05-24 14:33:58.000000000 +0400
--- XDecoratedPeer.java 2006-05-24 14:32:13.000000000 +0400
***************
*** 627,633 ****
--- 627,637 ----
XToolkit.awtLock();
try {
int runningWM = XWM.getWMID();
+ insLog.log(Level.FINE, "reparented={0}, visible={1}, WM={2}, decorations={3}",
+ new Object[] {isReparented(), isVisible(), runningWM, getDecorations()});
+
if (!isReparented() && isVisible() && runningWM != XWM.NO_WM
+ && runningWM != XWM.COMPIZ_WM
&& getDecorations() != winAttr.AWT_DECOR_NONE)
{
insLog.fine("- visible but not reparented, skipping");
***************
*** 635,640 ****
--- 639,652 ----
}
//Last chance to correct insets
if (!insets_corrected && getDecorations() != winAttr.AWT_DECOR_NONE) {
+ Insets correctWM;
+
+ if (runningWM == XWM.COMPIZ_WM)
+ {
+ correctWM = XWM.getWM().getInsets(this, window, 0);
+ }
+ else
+ {
long parent = -1;
XQueryTree qt = new XQueryTree(window);
try {
***************
*** 643,649 ****
} finally {
qt.dispose();
}
! Insets correctWM = (parent != -1) ? XWM.getWM().getInsets(this, window, parent) : null;
if (insLog.isLoggable(Level.FINER)) {
if (correctWM != null) {
insLog.finer("Configure notify - insets : " + correctWM);
--- 655,663 ----
} finally {
qt.dispose();
}
! correctWM = (parent != -1) ? XWM.getWM().getInsets(this, window, parent) : null;
! }
!
if (insLog.isLoggable(Level.FINER)) {
if (correctWM != null) {
insLog.finer("Configure notify - insets : " + correctWM);
***************
*** 683,689 ****
case XWM.CDE_WM:
case XWM.MOTIF_WM:
case XWM.METACITY_WM:
! case XWM.SAWFISH_WM: {
Point xlocation = queryXLocation();
if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "New X location: {0}", new Object[]{xlocation});
if (xlocation != null) {
--- 697,704 ----
case XWM.CDE_WM:
case XWM.MOTIF_WM:
case XWM.METACITY_WM:
! case XWM.SAWFISH_WM:
! case XWM.COMPIZ_WM: {
Point xlocation = queryXLocation();
if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "New X location: {0}", new Object[]{xlocation});
if (xlocation != null) {
***************
*** 702,709 ****
copy(currentInsets),
true);
-
-
insLog.log(Level.FINER, "Insets are {0}, new dimensions {1}",
new Object[] {currentInsets, newDimensions});
--- 717,722 ----
|