Re: [dev] [dwm] OpenOffice popups go to the wrong tag

From: Eckehard Berns <ecki-suckless_AT_ecki.to>
Date: Tue, 9 Aug 2011 17:54:05 +0200

On Tue, Aug 09, 2011 at 04:32:52PM +0100, Nick wrote:
> * I have oocalc in tag 1
> * I have tag 2 active
> * I open a new oocalc, with a password-protected file
> PROBLEM: the enter password floating window is opened in
> tag 1 (as it's associated with the original oocalc, I
> suppose.)
>
> Now, it goes without saying that this is likely to be
> OpenOffice's fault rather than dwm.

Hmm, hard to say. I _think_ the password dialog could make itself a
transient window for itself. But then again, that sounds wrong, too.

> I'm wondering if it's known behaviour, or if there's something dwm
> should handle differently (or could through config.h)?

Dwm does this by intention. In manage() in dwm.c the code explicitly
checks, whether the new window is a transient for an already managed
client. If so, the tags and monitor settings are copied from the main
window (in your case the ooclac window already open).

I haven't tested this, but something like

diff -r 131d4f6a8a1e dwm.c
--- a/dwm.c Fri Jul 29 20:01:22 2011 +0200
+++ b/dwm.c Tue Aug 09 17:49:07 2011 +0200
@@ -1109,8 +1109,9 @@
         c->win = w;
         updatetitle(c);
         if(XGetTransientForHint(dpy, w, &trans) && (t = wintoclient(trans))) {
- c->mon = t->mon;
- c->tags = t->tags;
+ /* c->mon = t->mon;
+ c->tags = t->tags; */
+ c->mon = selmon;
         }
         else {
                 c->mon = selmon;

could help you with oocalc (and might break other applications'
behaviours).

-- 
Eckehard Berns
Received on Tue Aug 09 2011 - 17:54:05 CEST

This archive was generated by hypermail 2.2.0 : Tue Aug 09 2011 - 18:00:06 CEST