Hi,

with the current version of the qt-gui plugin, I still have trouble
docking in WindowMaker. The problem has supposingly been fixed (CVS
commit at 2005-08-10 14:50), but as it turns out, this only applies
to other window managers like fluxbox.

When starting licq under WindowMaker (v0.92), the licq dock icon docks
properly. However, if one opens any further window (such as a message
window or the options dialog), the dock icon drops down to the
ordinary app icons at the bottom of the screen, leaving a vacant plain
in the dock. This situation cannot be reverted without either
disabling and reenabling the dock icon via Options or restarting licq.

The above behaviour is a result of the different ways the window_group
hint is handled within the qt-gui plugin. For the main window and the
dock icon, window_group is set manually with XSetWMHints(). But for
every other window, window_group remains unchanged.
With QT 3.3, the window_group hint seems to be managed automagically.
Thus the fix to this everlasting bug is as trivial as not setting
window_group at all.

I have included a proposed patch below. Docking under WindowMaker is
working perfectly with both licq-1.3.2 and CVS together with QT 3.3.6.
In blackbox, fluxbox and afterstep, docking works fine as before.
Index: plugins/qt-gui/src/mainwin.cpp
===================================================================
RCS file: /cvsroot/licq/qt-gui/src/mainwin.cpp,v
retrieving revision 1.378
diff -u -p -r1.378 mainwin.cpp
--- plugins/qt-gui/src/mainwin.cpp      14 Dec 2005 08:01:57 -0000      1.378
+++ plugins/qt-gui/src/mainwin.cpp      2 Apr 2006 13:23:03 -0000
@@ -351,19 +351,6 @@ CMainWindow::CMainWindow(CICQDaemon *the
 
   m_bDisableDockIcon = bDisableDockIcon;
 
-  // set up appicon and docking, code supplied by Mark Deneed
-  if (!m_bDisableDockIcon)
-  {
-    WId win = winId();     // get the window
-    XWMHints *hints;  // hints
-    Display *dsp = x11Display();  // get the display
-    hints = XGetWMHints(dsp, win);  // init hints
-    hints->window_group = win;  // set set the window hint
-    hints->flags = WindowGroupHint;  // set the window group hint
-    XSetWMHints(dsp, win, hints);  // set the window hints for WM to use.
-    XFree( hints );
-  }
-
   connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(slot_aboutToQuit()));
 
   // read in info from file
Index: plugins/qt-gui/src/userbox.cpp
===================================================================
RCS file: /cvsroot/licq/qt-gui/src/userbox.cpp,v
retrieving revision 1.176
diff -u -p -r1.176 userbox.cpp
--- plugins/qt-gui/src/userbox.cpp      26 Nov 2005 01:23:41 -0000      1.176
+++ plugins/qt-gui/src/userbox.cpp      2 Apr 2006 13:23:03 -0000
@@ -1005,11 +1005,6 @@ CUserView::CUserView(QPopupMenu *m, QWid
     classhint.res_name = "licq";
     classhint.res_class = szClass;
     XSetClassHint(x11Display(), winId(), &classhint);
-    XWMHints *hints = XGetWMHints(x11Display(), winId());
-    hints->window_group = winId();
-    hints->flags = WindowGroupHint;
-    XSetWMHints(x11Display(), winId(), hints);
-    XFree( hints );
     floaties->resize(floaties->size()+1);
     floaties->insert(floaties->size()-1, this);
   }
Index: plugins/qt-gui/src/wharf.cpp
===================================================================
RCS file: /cvsroot/licq/qt-gui/src/wharf.cpp,v
retrieving revision 1.60
diff -u -p -r1.60 wharf.cpp
--- plugins/qt-gui/src/wharf.cpp        22 Sep 2005 22:39:37 -0000      1.60
+++ plugins/qt-gui/src/wharf.cpp        2 Apr 2006 13:23:04 -0000
@@ -101,8 +101,7 @@ void IconManager::X11Init()
   hints->icon_x = 0;
   hints->icon_y = 0;
   hints->icon_window = wharfIcon->winId();
-  hints->window_group = win;  // set the window hint
-  hints->flags = WindowGroupHint | IconWindowHint | IconPositionHint | 
StateHint; // set the window group hint
+  hints->flags = IconWindowHint | IconPositionHint | StateHint;
   XSetWMHints(dsp, win, hints);  // set the window hints for WM to use.
   XFree( hints );
 

Reply via email to