Issues.00416 - lordmundi/wikidoctest GitHub Wiki
Summary: DOUG provided mouse coordinates not reliable
Created: 2012–03–26 10:48
Status: Released
Category: Bug
From: frankie
Version: 2.2
Released_In: 2.4
Description:
There are two tcl variables, ${doug.mousex} and ${doug.mousey} that are updated on mouse motion events. Some tcl scripts and plugins use the variables to detect where the cursor is on certain events.
The issue is that there are cases where these are unreliable. The following code can be pasted in the console to demonstrate the issue:
bind [doug.display get -ogl_window] <Button-1> {
set tk_mousex [expr [winfo pointerx $oglwin] - [winfo rootx $oglwin]];
set tk_mousey [expr [winfo pointery $oglwin] - [winfo rooty $oglwin]];
puts "DOUG Mouse XY: ${doug.mousex} ${doug.mousey} vs Tk: $tk_mousex $tk_mousey"
}
now, clicking on the DOUG window, you will get printouts that show the differences. Multiple clicks without moving the mouse should show the x coordinate increasing when it shouldn't be.
Also, when running on a machine where the DOUG window doesn't grab focus (such as on the Mac version), the very first mouse click can be off as no motion event has happened to cause it to update.
| commit | 9183af31b7a1d24e369a1bfd59b23b2ef91013f9
[link] |
||
| Author: | Alex Lin
|
| Date: | Wed Mar 15 12:57:22 2017 -0500
|
| Message: | [@Issue 00416: DOUG provided mouse coordinates not reliable
Found an assignment statement in doug.tcl where doug.mousex = doug_mousex + 1. This was causing the incrementing mousex value. @] |
Affected Files:
eng_graph.pkg | Bin 613208 -> 613114 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
| commit | 68f67e2d847a8268523d1ccb8026dfc45cd079c1
[link] |
||
| Author: | Alex Lin
|
| Date: | Wed Mar 15 13:23:20 2017 -0500
|
| Message: | [@EDGE Issue 00416: DOUG provided mouse coordinates not reliable
Removed statements in doug.pkg and dougkey.pkg assigning doug.mousex = doug.mousex + 1. @] |
Affected Files:
doug.pkg | Bin 2785650 -> 2785456 bytes
dougkey.pkg | Bin 2785658 -> 2785464 bytes
2 files changed, 0 insertions(+), 0 deletions(-)
| commit | 3b216711c4621b7fa5f9e2539ad3005c9871d89c
[link] |
||
| Author: | Frank Graffagnino
|
| Date: | Mon Mar 26 13:54:22 2012 -0500
|
| Message: | [@Fixes EDGE issue 00416: doug.mousex / mousey were unreliable
By adding a bind to the click event, windows without focus that get a click but no motion (such as the mac version) now get updated coordinates. Also, it looks like doug.tcl was also binding on the click and incrementing the doug.mousex variable directly. This might fix that by overwriting the change, but that script still needs to be updated. @] |
Affected Files:
src/doug/doug.c | 1 +
1 file changed, 1 insertion(+)