Re: Bug in Blackbox 0.61.1 with blackbox 0.61.1 icon patch V9

2002-01-07 Thread Sean 'Shaleh' Perry

> 
> If blackbox doesn't set focus on a window other than the one it just
> minimized, than the now-iconified window still is marked as being the
> current window.  Note--this problem only occurs when blackbox minimizes
> a window and doesn't have another window to set focus on.  bbkeys isn't
> given a different "currently focused" window to operate on, so it tells
> blackbox to perform whatever operation (in this case maximize) on the
> now-iconified window.  It's an obscure bug, but I think blackbox should
> be doing a sanity check (especially such a simple one as this).
> 

I agree, there is an issue in blackbox.  However I also believe that bbkeys
should try to not send messsages on bogus windows.  Both sides need some sanity
checks and some communication touch ups.



Re: Bug in Blackbox 0.61.1 with blackbox 0.61.1 icon patch V9

2002-01-06 Thread xOr

On Sun, Jan 06, 2002 at 09:44:50PM -0500, Jason 'vanRijn' Kasper wrote:
> * [01/06/02 21:23] Of all the gin joints in all the towns in all the world,
> * Sean 'Shaleh' Perry <[EMAIL PROTECTED]> walks into mine and says: 
> 
> > 
> > On 07-Jan-2002 Jason 'vanRijn' Kasper wrote:
> > > Hm thrice.  The problem here is that blackbox is trying to perform a
> > > maximize operation on a window that's not visible.  I believe that the
> > > correct fix is to add a simple check to the top of
> > > BlackboxWindow::maximize to see whether the window we're performing this
> > > operation on is even visible.
> > > 
> > > It's a one-liner fix, so I don't think a patch is necessary.  But my
> > > suggestion is to add "if (!flags.visible) return;" to the top of this
> > > function.  In the 62.0pre2 source of Window.cc, at line 1485, change 
> > > 
> > > void BlackboxWindow::maximize(unsigned int button) {
> > > 
> > > to
> > > 
> > > void BlackboxWindow::maximize(unsigned int button) {
> > >   if (!flags.visible) return;
> > > 
> > > 
> > > Any thoughts contrary to this?
> > > 
> > 
> > Let me get this straight.  You have Window A focused.  You click the iconify
> > button.  It goes away to icon land.  You then hit alt+m (or whatever you have
> > as MaximizeWindow) and blackbox crashes because it tries to maximize the window
> > it just iconifed?  It sounds to me like the real problem is blackbox is using
> > the wrong window as the recipient of messages.  Or did I misunderstand?
> > 
> 
> If blackbox doesn't set focus on a window other than the one it just
> minimized, than the now-iconified window still is marked as being the
> current window.  Note--this problem only occurs when blackbox minimizes
> a window and doesn't have another window to set focus on.  bbkeys isn't
> given a different "currently focused" window to operate on, so it tells
> blackbox to perform whatever operation (in this case maximize) on the
> now-iconified window.  It's an obscure bug, but I think blackbox should
> be doing a sanity check (especially such a simple one as this).

Well, when you close the last window and hit maximize, nothing goes
horribly wrong. So I think the problem is then in fact in blackbox, such
that whatever it does when the last window is closed, it should also do
when the last window is iconified (especially since its sending the same
type of message to bbkeys for both types of events).

xOr
-- 
I am damn unsatisfied to be killed in this way.



msg04691/pgp0.pgp
Description: PGP signature


Re: Bug in Blackbox 0.61.1 with blackbox 0.61.1 icon patch V9

2002-01-06 Thread Scott Moynes

* Jason 'vanRijn' Kasper ([EMAIL PROTECTED]) wrote:
> That's because you're using "XGetInputFocus(display, &w, &revert);" every
> time you do something with a window.  bbkeys uses a ClientMessage from
> blackbox to know what the currently focus'd window is.  This was done by
> design as an example of correct ICCM interaction, etc., etc.

My input was meant to help in tracking down the bug, wherever it may
lay. I hope I am not detecting vitriol where there is none to be
found.




msg04689/pgp0.pgp
Description: PGP signature


Re: Bug in Blackbox 0.61.1 with blackbox 0.61.1 icon patch V9

2002-01-06 Thread Jason 'vanRijn' Kasper

That's because you're using "XGetInputFocus(display, &w, &revert);" every
time you do something with a window.  bbkeys uses a ClientMessage from
blackbox to know what the currently focus'd window is.  This was done by
design as an example of correct ICCM interaction, etc., etc.

* [01/06/02 22:24] Of all the gin joints in all the towns in all the world,
* Scott Moynes <[EMAIL PROTECTED]> walks into mine and says: 

> * Milan Roubal ([EMAIL PROTECTED]) wrote:
> > Hi,
> > I am using bbkeys, when I pressed keys for maximilization of window, it is all 
>right.
> > But when I make icon from any window and then press keys for maximilization of
> > window, window maximizes and X restart and I need to login back.
> > in log is:
> > /usr/local/bin/blackbox: signal 11 caught
> > shutting down
> > aborting... dumping core
> > X connection to :0.0 broken.
> 
> 
> This is where the plot thickens. Using epistrophy, with basically the
> same code, I get no such crash.
> 
> -- 
> scott



-- 
%<--%<
Jason Kasper (vanRijn)
bash$ :(){ :|:&};:
Numbers 6:24-26



Re: Bug in Blackbox 0.61.1 with blackbox 0.61.1 icon patch V9

2002-01-06 Thread Scott Moynes

* Milan Roubal ([EMAIL PROTECTED]) wrote:
> Hi,
> I am using bbkeys, when I pressed keys for maximilization of window, it is all right.
> But when I make icon from any window and then press keys for maximilization of
> window, window maximizes and X restart and I need to login back.
> in log is:
> /usr/local/bin/blackbox: signal 11 caught
> shutting down
> aborting... dumping core
> X connection to :0.0 broken.


This is where the plot thickens. Using epistrophy, with basically the
same code, I get no such crash.

-- 
scott


msg04687/pgp0.pgp
Description: PGP signature


Re: Bug in Blackbox 0.61.1 with blackbox 0.61.1 icon patch V9

2002-01-06 Thread Milan Roubal

The same problem is with MaximizeVertical a MaximizeHorizontal.
   Milan Roubal

- Original Message -
From: "Milan Roubal" <[EMAIL PROTECTED]>
To: "Jason 'vanRijn' Kasper" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, January 07, 2002 3:53 AM
Subject: Re: Bug in Blackbox 0.61.1 with blackbox 0.61.1 icon patch V9


> what about same simple patch to 0.61.1? there
> the structure flags is unknown.
>Milan Roubal
>
> - Original Message -
> From: "Jason 'vanRijn' Kasper" <[EMAIL PROTECTED]>
> To: "blackbox mailing list" <[EMAIL PROTECTED]>; "Sean 'Shaleh'
Perry"
> <[EMAIL PROTECTED]>
> Sent: Monday, January 07, 2002 3:13 AM
> Subject: Re: Bug in Blackbox 0.61.1 with blackbox 0.61.1 icon patch V9
>
>
> > Hm thrice.  The problem here is that blackbox is trying to perform a
> > maximize operation on a window that's not visible.  I believe that the
> > correct fix is to add a simple check to the top of
> > BlackboxWindow::maximize to see whether the window we're performing this
> > operation on is even visible.
> >
> > It's a one-liner fix, so I don't think a patch is necessary.  But my
> > suggestion is to add "if (!flags.visible) return;" to the top of this
> > function.  In the 62.0pre2 source of Window.cc, at line 1485, change
> >
> > void BlackboxWindow::maximize(unsigned int button) {
> >
> > to
> >
> > void BlackboxWindow::maximize(unsigned int button) {
> >   if (!flags.visible) return;
> >
> >
> > Any thoughts contrary to this?
> >
> >
> >
> > On Sun, 2002-01-06 at 20:22, Milan Roubal wrote:
> > > Hi,
> > > I am using bbkeys, when I pressed keys for maximilization of window,
it
> is all right.
> > > But when I make icon from any window and then press keys for
> maximilization of
> > > window, window maximizes and X restart and I need to login back.
> > > in log is:
> > > /usr/local/bin/blackbox: signal 11 caught
> > > shutting down
> > > aborting... dumping core
> > > X connection to :0.0 broken.
> > > .
> > >Milan Roubal
> > >[EMAIL PROTECTED]
> > >
> > --
> > %<--%<
> > Jason Kasper (vanRijn)
> > bash$ :(){ :|:&};:
> > Numbers 6:24-26



Re: Bug in Blackbox 0.61.1 with blackbox 0.61.1 icon patch V9

2002-01-06 Thread Milan Roubal

what about same simple patch to 0.61.1? there
the structure flags is unknown.
   Milan Roubal

- Original Message -
From: "Jason 'vanRijn' Kasper" <[EMAIL PROTECTED]>
To: "blackbox mailing list" <[EMAIL PROTECTED]>; "Sean 'Shaleh' Perry"
<[EMAIL PROTECTED]>
Sent: Monday, January 07, 2002 3:13 AM
Subject: Re: Bug in Blackbox 0.61.1 with blackbox 0.61.1 icon patch V9


> Hm thrice.  The problem here is that blackbox is trying to perform a
> maximize operation on a window that's not visible.  I believe that the
> correct fix is to add a simple check to the top of
> BlackboxWindow::maximize to see whether the window we're performing this
> operation on is even visible.
>
> It's a one-liner fix, so I don't think a patch is necessary.  But my
> suggestion is to add "if (!flags.visible) return;" to the top of this
> function.  In the 62.0pre2 source of Window.cc, at line 1485, change
>
> void BlackboxWindow::maximize(unsigned int button) {
>
> to
>
> void BlackboxWindow::maximize(unsigned int button) {
>   if (!flags.visible) return;
>
>
> Any thoughts contrary to this?
>
>
>
> On Sun, 2002-01-06 at 20:22, Milan Roubal wrote:
> > Hi,
> > I am using bbkeys, when I pressed keys for maximilization of window, it
is all right.
> > But when I make icon from any window and then press keys for
maximilization of
> > window, window maximizes and X restart and I need to login back.
> > in log is:
> > /usr/local/bin/blackbox: signal 11 caught
> > shutting down
> > aborting... dumping core
> > X connection to :0.0 broken.
> > .
> >Milan Roubal
> >[EMAIL PROTECTED]
> >
> --
> %<--%<
> Jason Kasper (vanRijn)
> bash$ :(){ :|:&};:
> Numbers 6:24-26



Re: Bug in Blackbox 0.61.1 with blackbox 0.61.1 icon patch V9

2002-01-06 Thread Jason 'vanRijn' Kasper

* [01/06/02 21:23] Of all the gin joints in all the towns in all the world,
* Sean 'Shaleh' Perry <[EMAIL PROTECTED]> walks into mine and says: 

> 
> On 07-Jan-2002 Jason 'vanRijn' Kasper wrote:
> > Hm thrice.  The problem here is that blackbox is trying to perform a
> > maximize operation on a window that's not visible.  I believe that the
> > correct fix is to add a simple check to the top of
> > BlackboxWindow::maximize to see whether the window we're performing this
> > operation on is even visible.
> > 
> > It's a one-liner fix, so I don't think a patch is necessary.  But my
> > suggestion is to add "if (!flags.visible) return;" to the top of this
> > function.  In the 62.0pre2 source of Window.cc, at line 1485, change 
> > 
> > void BlackboxWindow::maximize(unsigned int button) {
> > 
> > to
> > 
> > void BlackboxWindow::maximize(unsigned int button) {
> >   if (!flags.visible) return;
> > 
> > 
> > Any thoughts contrary to this?
> > 
> 
> Let me get this straight.  You have Window A focused.  You click the iconify
> button.  It goes away to icon land.  You then hit alt+m (or whatever you have
> as MaximizeWindow) and blackbox crashes because it tries to maximize the window
> it just iconifed?  It sounds to me like the real problem is blackbox is using
> the wrong window as the recipient of messages.  Or did I misunderstand?
> 

If blackbox doesn't set focus on a window other than the one it just
minimized, than the now-iconified window still is marked as being the
current window.  Note--this problem only occurs when blackbox minimizes
a window and doesn't have another window to set focus on.  bbkeys isn't
given a different "currently focused" window to operate on, so it tells
blackbox to perform whatever operation (in this case maximize) on the
now-iconified window.  It's an obscure bug, but I think blackbox should
be doing a sanity check (especially such a simple one as this).

-- 
%<--%<
Jason Kasper (vanRijn)
bash$ :(){ :|:&};:
Numbers 6:24-26



Re: Bug in Blackbox 0.61.1 with blackbox 0.61.1 icon patch V9

2002-01-06 Thread Sean 'Shaleh' Perry

On 07-Jan-2002 Jason 'vanRijn' Kasper wrote:
> Hm thrice.  The problem here is that blackbox is trying to perform a
> maximize operation on a window that's not visible.  I believe that the
> correct fix is to add a simple check to the top of
> BlackboxWindow::maximize to see whether the window we're performing this
> operation on is even visible.
> 
> It's a one-liner fix, so I don't think a patch is necessary.  But my
> suggestion is to add "if (!flags.visible) return;" to the top of this
> function.  In the 62.0pre2 source of Window.cc, at line 1485, change 
> 
> void BlackboxWindow::maximize(unsigned int button) {
> 
> to
> 
> void BlackboxWindow::maximize(unsigned int button) {
>   if (!flags.visible) return;
> 
> 
> Any thoughts contrary to this?
> 

Let me get this straight.  You have Window A focused.  You click the iconify
button.  It goes away to icon land.  You then hit alt+m (or whatever you have
as MaximizeWindow) and blackbox crashes because it tries to maximize the window
it just iconifed?  It sounds to me like the real problem is blackbox is using
the wrong window as the recipient of messages.  Or did I misunderstand?



Re: Bug in Blackbox 0.61.1 with blackbox 0.61.1 icon patch V9

2002-01-06 Thread Jason 'vanRijn' Kasper

Hm thrice.  The problem here is that blackbox is trying to perform a
maximize operation on a window that's not visible.  I believe that the
correct fix is to add a simple check to the top of
BlackboxWindow::maximize to see whether the window we're performing this
operation on is even visible.

It's a one-liner fix, so I don't think a patch is necessary.  But my
suggestion is to add "if (!flags.visible) return;" to the top of this
function.  In the 62.0pre2 source of Window.cc, at line 1485, change 

void BlackboxWindow::maximize(unsigned int button) {

to

void BlackboxWindow::maximize(unsigned int button) {
  if (!flags.visible) return;


Any thoughts contrary to this?



On Sun, 2002-01-06 at 20:22, Milan Roubal wrote:
> Hi,
> I am using bbkeys, when I pressed keys for maximilization of window, it is all right.
> But when I make icon from any window and then press keys for maximilization of
> window, window maximizes and X restart and I need to login back.
> in log is:
> /usr/local/bin/blackbox: signal 11 caught
> shutting down
> aborting... dumping core
> X connection to :0.0 broken.
> .
>Milan Roubal
>[EMAIL PROTECTED]
> 
-- 
%<--%<
Jason Kasper (vanRijn)
bash$ :(){ :|:&};:
Numbers 6:24-26



Re: Bug in Blackbox 0.61.1 with blackbox 0.61.1 icon patch V9

2002-01-06 Thread Milan Roubal

my gdb:
Program received signal SIGSERV, segmentation fault.
0x806a198 in Workspace::raiseWindow (this=0x0, w=0x80909c8) at
Workspace.cc:261
261: screen->updateNetizenWindowReise(win->getClientWindow());
   Milan Roubal
   [EMAIL PROTECTED]
- Original Message -
From: "Jason 'vanRijn' Kasper" <[EMAIL PROTECTED]>
To: "Milan Roubal" <[EMAIL PROTECTED]>
Cc: "blackbox mailing list" <[EMAIL PROTECTED]>
Sent: Monday, January 07, 2002 3:01 AM
Subject: Re: Bug in Blackbox 0.61.1 with blackbox 0.61.1 icon patch V9


> Hm again. Good news and bad news... Good news is that this bug exists in
> blackbox 61.1 proper.  Bad news is that this bug exists in blackbox 61.1
> proper.  =:\
>
> On Sun, 2002-01-06 at 20:22, Milan Roubal wrote:
> > Hi,
> > I am using bbkeys, when I pressed keys for maximilization of window, it
is all right.
> > But when I make icon from any window and then press keys for
maximilization of
> > window, window maximizes and X restart and I need to login back.
> > in log is:
> > /usr/local/bin/blackbox: signal 11 caught
> > shutting down
> > aborting... dumping core
> > X connection to :0.0 broken.
> > .
> >Milan Roubal
> >[EMAIL PROTECTED]
> >
> --
> %<--%<
> Jason Kasper (vanRijn)
> bash$ :(){ :|:&};:
> Numbers 6:24-26



Re: Bug in Blackbox 0.61.1 with blackbox 0.61.1 icon patch V9

2002-01-06 Thread Jason 'vanRijn' Kasper

Hm again. Good news and bad news... Good news is that this bug exists in
blackbox 61.1 proper.  Bad news is that this bug exists in blackbox 61.1
proper.  =:\

On Sun, 2002-01-06 at 20:22, Milan Roubal wrote:
> Hi,
> I am using bbkeys, when I pressed keys for maximilization of window, it is all right.
> But when I make icon from any window and then press keys for maximilization of
> window, window maximizes and X restart and I need to login back.
> in log is:
> /usr/local/bin/blackbox: signal 11 caught
> shutting down
> aborting... dumping core
> X connection to :0.0 broken.
> .
>Milan Roubal
>[EMAIL PROTECTED]
> 
-- 
%<--%<
Jason Kasper (vanRijn)
bash$ :(){ :|:&};:
Numbers 6:24-26



Re: Bug in Blackbox 0.61.1 with blackbox 0.61.1 icon patch V9

2002-01-06 Thread Jason 'vanRijn' Kasper

Hm.  I can confirm this.  Iconize a window, then immediately do a
keybinding that tells blackbox to maximize a window. Core dump. 
Backtrace below, running 62.0pre2

(gdb) bt
#0  0x401c5911 in kill () from /lib/libc.so.6
#1  0x401c55f4 in raise () from /lib/libc.so.6
#2  0x401c6d71 in abort () from /lib/libc.so.6
#3  0x0804b1c5 in signalhandler (sig=11) at BaseDisplay.cc:164
#4  0x401c5848 in sigaction () from /lib/libc.so.6
#5  0x08063026 in BlackboxWindow::maximize (this=0x809c9a8, button=2)
at Window.cc:1598
#6  0x080658b0 in BlackboxWindow::changeBlackboxHints (this=0x809c9a8, 
net=0xbfffe418) at Window.cc:2877
#7  0x08068e70 in Blackbox::process_event (this=0xbfffe61c,
e=0xbfffe57c)
at blackbox.cc:677
#8  0x0804b9e2 in BaseDisplay::eventLoop (this=0xbfffe61c)
at BaseDisplay.cc:382
#9  0x0806c6e1 in main (argc=1, argv=0xb684) at main.cc:168
#10 0x401b565f in __libc_start_main () from /lib/libc.so.6

First one to come up with a patch gets a doggie biscuit!


On Sun, 2002-01-06 at 20:22, Milan Roubal wrote:
> Hi,
> I am using bbkeys, when I pressed keys for maximilization of window, it is all right.
> But when I make icon from any window and then press keys for maximilization of
> window, window maximizes and X restart and I need to login back.
> in log is:
> /usr/local/bin/blackbox: signal 11 caught
> shutting down
> aborting... dumping core
> X connection to :0.0 broken.
> .
>Milan Roubal
>[EMAIL PROTECTED]
> 
-- 
%<--%<
Jason Kasper (vanRijn)
bash$ :(){ :|:&};:
Numbers 6:24-26



Bug in Blackbox 0.61.1 with blackbox 0.61.1 icon patch V9

2002-01-06 Thread Milan Roubal



Hi,
I am using bbkeys, when I pressed keys for 
maximilization of window, it is all right.
But when I make icon from any window and then press 
keys for maximilization of
window, window maximizes and X restart and I need 
to login back.
in log is:
/usr/local/bin/blackbox: signal 11 
caught
shutting down
aborting... dumping core
X connection to :0.0 broken.

   Milan Roubal
   [EMAIL PROTECTED]