After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 780979 - Fullscreen windows with WS_EX_NOACTIVATE | WS_EX_TRANSPARENT interfere with GIMP UI events
Fullscreen windows with WS_EX_NOACTIVATE | WS_EX_TRANSPARENT interfere with G...
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: User Interface
2.8.20
Other Windows
: Normal normal
: Future
Assigned To: GIMP Bugs
GIMP Bugs
: 710009 720086 764008 774012 784931 792078 (view as bug list)
Depends on: 658842
Blocks:
 
 
Reported: 2017-04-06 15:51 UTC by Michael Schumacher
Modified: 2018-05-24 17:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Schumacher 2017-04-06 15:51:25 UTC
Thanks to user Floatharr on #gimp, we figured out another application that interferes with certain features of the GIMP user interface on the Windows platform:

Strokes Plus http://www.strokesplus.com/

The software optionally uses an invisible window covering the whole screen to paint the gestures users make, and this interferes with the events GIMP (or GTK+) receives, it seems. We suspected similar behavior of the other applications doing this.
Comment 1 Jehan 2017-04-06 20:37:43 UTC
For all these stuff, we'd really need a Windows developer willing to spend some time testing. Without one, I fear this is one of these bugs which will stay here forever. :-/
Personally I'd need to be really really bored (or paid) to test.

Anyway let's make a "Future" milestone for now.
Comment 2 Michael Schumacher 2017-04-07 09:41:37 UTC
Turns out that the Strokes Plus community even knows about this issue:
http://www.strokesplus.com/forum/topic/750/open-enable-s-if-this-application-is-stopped
Comment 3 Michael Schumacher 2017-04-07 09:47:01 UTC
And it affects other GTK+ applications, as well, Floatharr has tested this for Inkscape. There's a hint in one of the comments there:

"Try unchecking Keep Gesture Window On Top* and Don't Hide Gesture Draw Window*. The gesture drawing surface is a full-screen transparent window. It's possible that Gimp thinks it's an application window and doesn't behave properly."


Pure guess:

GTK+ is discarding mouse-over events, or not requesting to be notified of them (the symptom was menus sticking around unless the user clicks) if it considers windows covered by other applications' windows. Full-screen transparent windows seem to be a special case that is not handled properly for the MS Windows backend, at least.
Comment 4 Jehan 2017-04-07 09:54:05 UTC
That seems like a good use case to maybe even fix all the bugs about applications which make interferences with GIMP.

Do we know if that affects GTK+3 as well?
Comment 5 Michael Schumacher 2017-08-31 20:50:43 UTC
*** Bug 774012 has been marked as a duplicate of this bug. ***
Comment 6 Michael Schumacher 2017-10-18 20:06:26 UTC
*** Bug 784931 has been marked as a duplicate of this bug. ***
Comment 7 Michael Schumacher 2017-10-18 20:10:52 UTC
*** Bug 720086 has been marked as a duplicate of this bug. ***
Comment 8 Michael Schumacher 2017-10-18 20:13:38 UTC
*** Bug 710009 has been marked as a duplicate of this bug. ***
Comment 9 Michael Schumacher 2017-10-20 19:48:36 UTC
So Ell has found the issue in GTK's GDK code, a one-line change at the point where GDK tries to determine what window an event is supposed to go to.

I didn't ask for the specific line, so the following is my own interpretation and any errors are on me.

The window lookup happens in _gdk_windowing_window_at_pointer 
https://git.gnome.org/browse/gtk+/tree/gdk/win32/gdkwindow-win32.c?h=gtk-2-24#n2748


This skips windows if they are e.g. invisible. It does not skip transparent windows yet, though:
https://git.gnome.org/browse/gtk+/tree/gdk/win32/gdkwindow-win32.c?h=gtk-2-24#n2764


Adding CWP_SKIPTRANSPARENT to the call to ChildWindowFromPointEx should be the approach to try, unless this has consequences I'm not aware of (which are plenty):

https://git.gnome.org/browse/gtk+/tree/gdk/win32/gdkwindow-win32.c?h=gtk-2-24#n2780
https://msdn.microsoft.com/en-us/library/windows/desktop/ms632677(v=vs.85).aspx
Comment 10 Ell 2017-10-20 21:03:08 UTC
Ay, schumaml beat me to the punch :)  See bug 658842, comment 15.
Comment 11 Michael Schumacher 2017-10-24 16:36:06 UTC
I jotted down this as the bug to justify another - possibly the final - 2.8.x release. Provided that we can persuade GTK+ do do another 2.24.x release with any changes, if those turn out to be correct in the first place.
Comment 12 Jehan 2017-10-24 21:59:48 UTC
> Provided that we can persuade GTK+ do do another 2.24.x release with any changes

For info, we really need a new release for other fixes (related to Windows issues as well) too. Actually even our configure script already has a warning advising to install GTK+ 2.24.32, but this version has not been released yet! Currently, shortcuts with non-latin languages are broken (bug 769550) and vector icons are disabled (bug 781020).
So even if that fix was not to get included, a new GTK+ 2.24.x release would be worth it (of course if we *also* had this fix as well, this would be even cooler because that's quite a long running issue now).
Comment 13 Ell 2017-10-29 19:20:13 UTC
I pushed a gtk patch to master that should, hopefully, fix this.  I'll include it in 2.9.8, so that we can get it tested.

commit fb5354c9e55a789f0b908d7361fdc41c70e08d57
Author: Ell <ell_se@yahoo.com>
Date:   Sun Oct 29 15:08:07 2017 -0400

    Bug 780979 - Fullscreen windows with WS_EX_NOACTIVATE | WS_EX_TRANSPARENT ...
    
    ... interfere with GIMP UI events
    
    Add a GTK+ patch to ignore top-level transparent windows when
    looking for the top-level GDK window at a certain pointer location,
    in the Win32 GDK backend.

 build/windows/patches/gtk+-2.24-bug780979.patch | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
Comment 14 Jehan 2017-10-30 19:33:03 UTC
Is bug 658842 the corresponding GTK+ bug? I see a patch there but it's different from yours. If yours is better, could you propose it and write down that we need it for GIMP?
Comment 15 Ell 2017-10-30 21:52:18 UTC
The patch in bug 658842 is already committed, and is, in fact, what caused this issue (while fixing another one) :)  I mentioned our issue in comment 15 on that bug (without a patch, but the patch does exactly what the comment says.)
Comment 16 Ell 2017-12-15 19:01:14 UTC
The above patch has been applied in the Windows build of GIMP 2.9.8.

Everyone who has reported relevant issues: please download and test the 2.9.8 Windows version, check if it solves your problem, and report back.  We need your input!  Thanks :)
Comment 17 Aaron Little 2017-12-22 14:38:23 UTC
Longtime fan, first time writer.

I'm on Windows 10 Pro.

I was on 2.8.22 and was getting the non-working dockable items (and layer reorder) bug. I moved to 2.9.8 this morning. The issue persisted so i decided to close all other apps and reopen gimp - now works even with all the other apps open. I've tried recreating everything as i had it this morning to see if i could break it and it's worked perfectly since. 

Finally, for funsies, i restarted my computer, started everything i had open previously before starting GIMP and it worked well. So it appears to be working...i'll update this if anything changes for me.

Thanks devs for an awesome product.
Comment 18 Michael Schumacher 2017-12-22 14:53:16 UTC
The initial persistence of the issue worries me, though.
Comment 19 Michael Schumacher 2017-12-26 09:50:28 UTC
*** Bug 764008 has been marked as a duplicate of this bug. ***
Comment 20 Aaron Little 2017-12-28 15:24:16 UTC
(In reply to Michael Schumacher from comment #18)
> The initial persistence of the issue worries me, though.

just as a follow up, i've used GIMP 2.9.8 over the past week with no issues since the initial time i ran it (as noted on 12/22)
Comment 21 Jehan 2017-12-28 15:36:35 UTC
I'd say we can close it. Even if it persisted once, the issue still disappeared at next GIMP start without needing any more complicated action.
I think that's good enough for an issue which bothered us so much for years.

Now if you really think this should investigated, suit yourself. So I leave it opened for now. :-)
Comment 22 jeriba4 2017-12-31 18:23:42 UTC
*** Bug 792078 has been marked as a duplicate of this bug. ***
Comment 23 GNOME Infrastructure Team 2018-05-24 17:42:37 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/1082.