ID:107914
 
Resolved
Middle-clicking an atom in a statpanel did not release the mouse capture after the middle button was released.
BYOND Version:479
Operating System:Windows XP Pro
Web Browser:Firefox 3.6.13
Applies to:Dream Seeker
Status: Resolved (480)

This issue has been resolved.
Descriptive Problem Summary:
Well, I tried to set up a library and party of it was controlling clicks, and for some reason when I try to get middle and right clicks, focus remains on the object.

Numbered Steps to Reproduce Problem:
1) set up something similar to this:
#ifdef RIGHT_CLICK
client/show_popup_menus = 0
atom/proc/RightClick(var/mob/M, var/location, var/control, var/params) return ..()
//Click(location,control,params)
atom/Click(location,control,params)
..()
var/list/parameters = params2list(params)
if(parameters["right"]) spawn() src.RightClick(usr, location, control, params)
#endif

#ifdef LEFT_CLICK
atom/proc/LeftClick(var/mob/M, var/location, var/control, var/params) return ..()
atom/Click(location,control,params)
..()
var/list/parameters = params2list(params)
if(parameters["left"]) spawn() src.LeftClick(usr, location, control, params)
#endif

#ifdef MIDDLE_CLICK
atom/proc/MiddleClick(var/mob/M, var/location, var/control, var/params) return ..()
atom/Click(location,control,params)
..()
var/list/parameters = params2list(params)
if(parameters["middle"]) spawn() src.MiddleClick(usr, location, control, params)
#endif


Then turn everything on, and well I have a little demo anyway...

Code Snippet (if applicable) to Reproduce Problem:
atom
RightClick(var/mob/M)
..()
M<<"Right Clicked [src.name]"
LeftClick(var/mob/M)
..()
M<<"Left Clicked [src.name]"
MiddleClick(var/mob/M)
..()
M<<"Middle Clicked [src.name]"


obj
Box
name = "box"
icon = 'box.dmi'


mob
Login()
..()
contents += new/obj/Box

mob
Stat()
..()
statpanel("Contents", contents)


Expected Results:
Click, focus goes to object, process finishes, focus is no longer the object.

Actual Results:
Focus remains on the object until you click on another window then restore the game window.

Does the problem occur:
Every time? Or how often? Everytime
In other games? Not Sure.
In other user accounts? N/A
On other computers? Not Sure.

When does the problem NOT occur?
When using left clicks.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)

Workarounds:
Don't use the library.

Demo:
http://dl.dropbox.com/u/9505004/Libraries%20%26%20Demos/ Library_src.zip
I'm not sure what you mean about focusing on an object, because DM doesn't have a concept of mouse focus being on an object. It does have that for interface elements; is that what you meant?
I'm guessing it is. What I meant was that after right clicking on an object, when clicking on any part of the window I was apparently still clicking on the object.