http://bugs.winehq.org/show_bug.cgi?id=28629
Bug #: 28629 Summary: TrackMouseEvent saves tracking data only for last caller's HWND Product: Wine Version: 1.3.29 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: user32 AssignedTo: wine-bugs@winehq.org ReportedBy: b7.10110111@gmail.com Classification: Unclassified
See this code from dlls/user32/input.c:
/* fill the TRACKMOUSEEVENT struct with the current tracking for the given hwnd */ if (ptme->dwFlags & TME_QUERY ) { *ptme = tracking_info.tme; /* set cbSize in the case it's not initialized yet */ ptme->cbSize = sizeof(TRACKMOUSEEVENT);
return TRUE; /* return here, TME_QUERY is retrieving information */ }
Although the comment says it works per-hwnd, the code itself doesn't have any logic concerning hwnd.
This problem makes button theming with hover support work incorrectly in various cases. The easiest way to see this is as follows: 0. Configure some windowsXP theme, e.g. Luna or Royale 1. Start winecfg 2. Select "Libraries" tab 3. Press Edit (having at least one override) 4. Press Cancel on the dialog 5. Try to hover any button on the winecfg main window - it won't work. The reason for this not working is that the "Edit Override" dialog's Cancel button, being hovered, has called TrackMouseEvent for TME_LEAVE, and after pressing it, it was destroyed, still leaving mouse tracking structure (global, not per-hwnd, which is the core problem) in TME_LEAVE enabled state. Now, when Edit or any other button becomes hovered, the structure returned on TME_QUERY suggests that TME_LEAVE is enabled, so for Edit button's hwnd the timer isn't set.
So, the solution should be to make tracking_info per-hwnd, instead of global.
http://bugs.winehq.org/show_bug.cgi?id=28629
--- Comment #1 from Austin English austinenglish@gmail.com 2013-11-13 16:50:32 CST --- This is your friendly reminder that there has been no bug activity for 2 years. Is this still an issue in current (1.7.6 or newer) wine? If so, please attach the terminal output in 1.7.6 (see http://wiki.winehq.org/FAQ#get_log).
http://bugs.winehq.org/show_bug.cgi?id=28629
--- Comment #2 from Ruslan Kabatsayev b7.10110111@gmail.com 2013-11-14 12:54:28 CST --- Yes, still present in current git. Terminal output doesn't give any relevant info.
https://bugs.winehq.org/show_bug.cgi?id=28629
--- Comment #3 from Austin English austinenglish@gmail.com --- This is your friendly reminder that there has been no bug activity for 1 year. Is this still an issue in current (1.7.31 or newer) wine? If so, please attach the terminal output in 1.7.31 (see http://wiki.winehq.org/FAQ#get_log).
https://bugs.winehq.org/show_bug.cgi?id=28629
--- Comment #4 from Ruslan Kabatsayev b7.10110111@gmail.com --- Still present in wine-1.7.31-99-g5ecea72.