POV-Ray : Newsgroups : povray.programming : [patch] Press mouse with +P Server Time
3 Jul 2024 05:33:14 EDT (-0400)
  [patch] Press mouse with +P (Message 1 to 3 of 3)  
From: Wolfgang Wieser
Subject: [patch] Press mouse with +P
Date: 29 Nov 2003 07:31:22
Message: <3fc89199@news.povray.org>
Here we go again...

Christoph Hormann wrote:
>I did not completely understand your description, does this also fix the 
>problem that when you close the render window with a mouse click after 
>completition (with the +p option) the mouse event is passed to whatever 
>is behind the window?
>
This is a separate patch for the mouse press bug as described above: 

Modified in unix.cpp:

Add ButtonReleaseMask to the event mask: 
-----------------------------------------------------------------------
#define theEVENTMASK  (ButtonPressMask      | \
                       ButtonReleaseMask    | \
                       KeyPressMask         | \
                       ExposureMask         | \
                       StructureNotifyMask)
-----------------------------------------------------------------------

Make button release quit POVRay (instead of button press): 
This is to replace the "case ButtonPress:" label in HandleXEvents():

-----------------------------------------------------------------------
      case ButtonPress:
    #if (X11_DEBUG > 0)
            Debug_Info("ButtonPress\n");
    #endif
        if(!finished)
        {
            /*
             * If not finished, a button click will cause a window refresh.
             */
            refresh_x_min = 0;
            refresh_y_min = theCurrY;
            refresh_x_max = Frame.Screen_Width;
            refresh_y_max = theCurrY + 1;
            refresh = True;
        }
        break;
      case ButtonRelease:
    #if (X11_DEBUG > 0)
            Debug_Info("ButtonRelease\n");
    #endif
        if(finished)
        {
           /* If finished, a button release will quit.*/
           abortRender |= finished;
        }
        break;
-----------------------------------------------------------------------

I will not post the complete function here because it is too long. 

Wolfgang


Post a reply to this message

From: Nicolas Calimet
Subject: Re: [patch] Press mouse with +P
Date: 1 Dec 2003 08:02:12
Message: <3FCB3BD4.3050601@free.fr>
> This is a separate patch for the mouse press bug as described above

	Thanks for this !  The patch has been tested and applied.
	You're welcome to find some more  :-)

	- NC


Post a reply to this message

From: Wolfgang Wieser
Subject: Re: [patch] Press mouse with +P
Date: 3 Dec 2003 12:42:59
Message: <3fce20a2@news.povray.org>
Nicolas Calimet wrote:

>> This is a separate patch for the mouse press bug as described above
> 
> Thanks for this !  The patch has been tested and applied.
> You're welcome to find some more  :-)
> 
When I have the time...

Are there any bug reporst as a hint for where to look for?

Wolfgang


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.