nanogui: A little change on raising window


Previous by date: 7 Aug 2002 10:34:15 -0000 Re: limit the number of GrMoveWindow() calls!, wang
Next by date: 7 Aug 2002 10:34:15 -0000 -O3 and fstat, David Muse
Previous in thread: 7 Aug 2002 10:34:15 -0000 A little change on raising window, wang
Next in thread:

Subject: Re: [nanogui] A little change on raising window
From: "wang" ####@####.####
Date: 7 Aug 2002 10:34:15 -0000
Message-Id:

>Alex,Greg:
>
>  When we press mouse button inside a window ,and 
>the window now is not active (be partly covered),
>only mouse position is in the caption,the window 
>can be raised,I think it's not convenient .I want
>that despite wherever the mouse position is, if 
>it in the window ,the window should be raised.
>  So take some change to the code:
>     r.height = CYCAPTION;
>
> to
>    r.height =info.height - cxborder*2;
>
>  certainly the comment should be changed too.

 I'm very sorry to say that my upper change doesn't
solve the problem very well ,you will find with this
change ,despite wherever you drag the window ,the window
will move .
 And I find another simple but efficient way to do so:
  in fuction  container_buttondown()(actions.c)
   put these lines :


 /* Raise window if mouse down and allowed*/
	if (!(info.props & GR_WM_PROPS_NORAISE))
		GrRaiseWindow(window->wid);


   before:


 /* Get caption box rect*/
	r.x = cxborder;
	r.y = cyborder;
	r.width = info.width - cxborder*2;
	r.height = CYCAPTION;

	/* Check for mousedn in caption box*/
	if (!PtInRect(&r, event->x, event->y))
		return;


 It should work very well.
        wang
####@####.####
          2002-08-07





Previous by date: 7 Aug 2002 10:34:15 -0000 Re: limit the number of GrMoveWindow() calls!, wang
Next by date: 7 Aug 2002 10:34:15 -0000 -O3 and fstat, David Muse
Previous in thread: 7 Aug 2002 10:34:15 -0000 A little change on raising window, wang
Next in thread:


Powered by ezmlm-browse 0.20.