I believe that I've fixed this, actually.  WOOT.  This has annoyed me to
no end.  The problem as I see it is that blackbox sets the window state
for any window not currently on the current workspace to "withdrawn".  I
believe this causes opera to behave differently and not know that it
already has a window open.  If you comment out line 1428 (in my blackbox
source anyway) of Window.cc, in BlackboxWindow::withdraw(void) where he
does setState(WithdrawnState);, it should fix this.  

Brad, if you're reading is there any reason that this was put in? 
Simply XUnmapWindow'ing windows that aren't on the current workspace
seems to work fine.

Shaleh, please take a gander at this and see if you have any objections
to putting it in 61.2.  The affect that this has (at least with this
opera situation) is that opera's state hasn't changed to Withdrawn and
he's now able to receive the "open a new link" message.  Now, granted,
opera doesn't magically switch the desktop to where it is, but it does
get the message to open a new link and doesn't open a brand new window
on the current desktop....

So, again, the fix that I've come up with is as follows....  Window.cc
should have this....

void BlackboxWindow::withdraw(void) {
  visible = False;
  iconic = False;

  // setState(WithdrawnState); 
  XUnmapWindow(display, frame.window);

  XSelectInput(display, client.window, NoEventMask);
  XUnmapWindow(display, client.window);
  XSelectInput(display, client.window,
               PropertyChangeMask | StructureNotifyMask |
FocusChangeMask);

  if (windowmenu) windowmenu->hide();
}


On Wed, 2001-12-12 at 11:33, Sean 'Shaleh' Perry wrote:
> On 12-Dec-2001 Christian Dysthe wrote:
> > Hi,
> > 
> > I asked about this a while back, but got no answer. Maybe someone
> > now knows why Blackbox allows several instanses of Opera (the web
> > browser) as long as each instance is opened on different desktops? 
> > 
> > For instance, if I click on a link in my mailer an Opera instance is
> > opened even though another instance of Opera is running on another
> > desktop. In other WM's a click on an e-mail link switches to the
> > desktop where Opera is already running opening a window with the
> > link content, while in Blackbox one is opened on the current
> > desktop.
> > 
> > I know for a fact that Opera is not designed to allow several
> > instances of itself. So why is Blackbox allowing it for this
> > application while other WM's I have tried this on (KDE, Gnome, IceWM
> > and XFce) don't?
> > 
> 
> That is not the wm's job.  If the app wants to only allow one instance it can
> handle that.  Switching workspaces (desktops) is even worse behaviour.
-- 
----%<----------%<----
Jason Kasper (vanRijn)
bash$ :(){ :|:&};:
Numbers 6:24-26

Reply via email to