I just realized, that in WINE, my windows receive WM_DROPFILES only if they are top level windows. All children windows never accept WM_DROPFILES, regardless of the presence of WS_EX_ACCEPTFILES or calling DragAcceptFiles() for this child window.
In Windows everything works OK and the children correctly receive WM_DROPFILES message.
Is it a bug in WINE, or something OS/WM dependent?
How to fix it? Is it a good idea, for example, to accept the message in the main window and dispatch it to the respective children windows (by using DragQueryPoint) - this approach should work both in WINE and Windows.
WINE v1.9.19 XFCE4 window manager.
Hello. Please, give me some receiving confirmation. I have a feeling I am stealth-banned from this mailing list.
On Wed, 5 Oct 2016 11:57:11 +0300 John Found johnfound@asm32.info wrote:
I just realized, that in WINE, my windows receive WM_DROPFILES only if they are top level windows. All children windows never accept WM_DROPFILES, regardless of the presence of WS_EX_ACCEPTFILES or calling DragAcceptFiles() for this child window.
In Windows everything works OK and the children correctly receive WM_DROPFILES message.
Is it a bug in WINE, or something OS/WM dependent?
How to fix it? Is it a good idea, for example, to accept the message in the main window and dispatch it to the respective children windows (by using DragQueryPoint) - this approach should work both in WINE and Windows.
WINE v1.9.19 XFCE4 window manager.
-- http://fresh.flatassembler.net http://asm32.info John Found johnfound@asm32.info
On Wed, Oct 5, 2016 at 12:53 PM, John Found johnfound@asm32.info wrote:
Hello. Please, give me some receiving confirmation. I have a feeling I am stealth-banned from this mailing list.
Hello, you are here. It is just that probably nobody knows how to help, sorry.
Hello John!
On 10/05/2016 05:53 PM, John Found wrote:
Hello. Please, give me some receiving confirmation. I have a feeling I am stealth-banned from this mailing list.
You're not banned but this stuff is probably better directed to bugzilla or irc.
Actually as you already did a lot of troubleshooting submitting a test case to wine-patches@redhat.com would get more attention.
bye michael
On Wed, 5 Oct 2016 11:57:11 +0300 John Found johnfound@asm32.info wrote:
I just realized, that in WINE, my windows receive WM_DROPFILES only if they are top level windows. All children windows never accept WM_DROPFILES, regardless of the presence of WS_EX_ACCEPTFILES or calling DragAcceptFiles() for this child window.
In Windows everything works OK and the children correctly receive WM_DROPFILES message.
Is it a bug in WINE, or something OS/WM dependent?
How to fix it? Is it a good idea, for example, to accept the message in the main window and dispatch it to the respective children windows (by using DragQueryPoint) - this approach should work both in WINE and Windows.
WINE v1.9.19 XFCE4 window manager.
On 10/05/2016 06:07 PM, Michael Stefaniuc wrote:
On 10/05/2016 05:53 PM, John Found wrote:
Hello. Please, give me some receiving confirmation. I have a feeling I am stealth-banned from this mailing list.
You're not banned but this stuff is probably better directed to bugzilla or irc.
Actually as you already did a lot of troubleshooting submitting a test case to wine-patches@redhat.com would get more attention.
Bloody muscle memory... that should of course be wine-patches@winehq.org
bye michael
On Wed, 5 Oct 2016 11:57:11 +0300 John Found johnfound@asm32.info wrote:
I just realized, that in WINE, my windows receive WM_DROPFILES only if they are top level windows. All children windows never accept WM_DROPFILES, regardless of the presence of WS_EX_ACCEPTFILES or calling DragAcceptFiles() for this child window.
In Windows everything works OK and the children correctly receive WM_DROPFILES message.
Is it a bug in WINE, or something OS/WM dependent?
How to fix it? Is it a good idea, for example, to accept the message in the main window and dispatch it to the respective children windows (by using DragQueryPoint) - this approach should work both in WINE and Windows.
WINE v1.9.19 XFCE4 window manager.
After some talks and hints in the chat (thanks, puk, tbodt, nsivov!) I was able to fix the problem at least partially.
The problem is that WINE uses WindowFromPoint to detect the drop target.
WindowFromPoint uses WM_NCHITTEST to test the window and does not return windows returning HTTRANSPARENT.
This way, these windows (tab controls for example) can not be drop targets at all.
On the other hand, testing my code in Windows, I noticed, that it does not send WM_NCHITTEST at all and the "transparent" children are properly detected as a drop target.
It is a big question why Windows does not send WM_NCHITTEST. It is documented behavior in the cases when WindowFromPoint is called from another thread.
So, what is the thread that control the drag and drop operations? In the case of WINE it is obviously the same thread as the window creator (as long as it sends WM_NCHITTEST).
In the case of Windows - it can be simply another thread, or drag/drop operation does not use WindowFromPoint.
Any ideas about fixing all this mess? Writing own WindowFromPoint especially for the drag&drop operations?
On Wed, 5 Oct 2016 11:57:11 +0300 John Found johnfound@asm32.info wrote:
I just realized, that in WINE, my windows receive WM_DROPFILES only if they are top level windows. All children windows never accept WM_DROPFILES, regardless of the presence of WS_EX_ACCEPTFILES or calling DragAcceptFiles() for this child window.
In Windows everything works OK and the children correctly receive WM_DROPFILES message.
Is it a bug in WINE, or something OS/WM dependent?
How to fix it? Is it a good idea, for example, to accept the message in the main window and dispatch it to the respective children windows (by using DragQueryPoint) - this approach should work both in WINE and Windows.
WINE v1.9.19 XFCE4 window manager.
-- http://fresh.flatassembler.net http://asm32.info John Found johnfound@asm32.info
On Thu, 6 Oct 2016 10:28:14 +0300 John Found johnfound@asm32.info wrote:
Any ideas about fixing all this mess? Writing own WindowFromPoint especially for the drag&drop operations?
Well, that was exactly what I tried and everything seems to work good. In the attachment is the modified file: "dlls/winex11.drv/xdnd.c"
Please someone to review it and if it fits the standards of the project, commit it to the repository (or what the git people do with the modified files)...
If not, give me some directions what to do further.
On 10/06/2016 12:46 PM, John Found wrote:
On Thu, 6 Oct 2016 10:28:14 +0300 John Found johnfound@asm32.info wrote:
Any ideas about fixing all this mess? Writing own WindowFromPoint especially for the drag&drop operations?
Well, that was exactly what I tried and everything seems to work good. In the attachment is the modified file: "dlls/winex11.drv/xdnd.c"
Please someone to review it and if it fits the standards of the project, commit it to the repository (or what the git people do with the modified files)...
Diffs are easier to review so here it is (generated with just 'git diff')
bye michael