[Thread Prev][Thread Next]   >Date Index >Thread Index

[wmx] 5sec3 bugfix patch

Andrew Chadwick - Tue Feb 09 11:12:04 1999

Does anyone else notice this one, or is my system just weird?

  * Configure wmx with CONFIG_USE_PIXMAPS -and- CONFIG_USE_PIXMAP_MENUS
  * Run it. Open some windows. Close everything.
  * Try to open one of the root menus. Um, it's probably not meant to
    crash like that.

It's been bugging me for a while now, so here's a better fix than last
time. Please apply to your favourite 5sec3 and nitpick away:-)



--- wmx-5sec3.orig/Border.C     Wed Jan 20 22:10:07 1999
+++ wmx-5sec3/Border.C  Mon Feb  8 21:47:55 1999
@@ -97,6 +97,7 @@
 
     if (--borderCounter == 0) {
        XFreeGC(display(), m_drawGC);
+       m_drawGC = 0;
        if (m_backgroundPixmap != None) {
            XFreePixmap(display(), m_backgroundPixmap);
        }
@@ -106,7 +107,7 @@
 
 void Border::initialiseStatics(WindowManager *wm)
 {
-    if (m_tabFont) return;
+    if (m_drawGC) return;
 
     if (sizeof(BorderRectangle) != sizeof(XRectangle)) {
        wm->fatal("internal error: border rectangle and X rectangle\n"
@@ -168,14 +169,14 @@
 
 Pixmap Border::backgroundPixmap(WindowManager *wm)
 {
-    if (!m_tabFont) Border::initialiseStatics(wm);
+    if (!m_drawGC) Border::initialiseStatics(wm);
     return m_backgroundPixmap;
 }
 
 
 GC Border::drawGC(WindowManager *wm)
 {
-    if (!m_tabFont) Border::initialiseStatics(wm);
+    if (!m_drawGC) Border::initialiseStatics(wm);
     return m_drawGC;
 }
 


Now the background pixmaps and border GCs are always where Menu.C
expects them to be, which keeps it happy and me happy.


-- 
Andrew




Next: