Ok, I have applied Ben Jackson's fix and also enabled GDK_NATIVE_WINDOWS=1 and it works flawlessly (well, except for the hotpluging error we already know about and you said it is gone in gtk 3).
I have studied the code in gdkevents-win32.c quite a lot, especially the gdk_event_translate function, and I have to say Ben Jackson's fix is OK, but it is also not complete as he only wanted to test the thing, so I have added the missing part from the 2.16 repository (which is a more specific function for the propagate call, made in the same fashion as other similar ones that were kept) The point is, the propagate function blocks message propagation if the target window doesn't want them. One special case of this is when window receives events from extended devices and the extended events queue is not empty. The way I see it is that this propagate() function is used only on messages that could be confused with ones received from an extended input device. propagate() was used extensively in 2.16 (for 8 message types) but then they changed a lot of code there and tried to get rid of all of it, but I guess they kept it as a "hack" for WM_KEYDOWN and WM_IME_COMPOSITION (maybe they didn't have other solutions), but they forgot (didn't know it was necessary) to put it back on WM_MOUSEMOVE too (and maybe other events too, I will investigate), which is also a message that can be confused with one received from an extended input, so it is correct to do the propagate() test and find out if it really comes from such a device. Within the propagate function call, we have _gdk_display->keyboard_grab.window, which is basically accessing a member of the GdkDisplay structure, which was introduced in 2.2. However, if you look here http://developer.gnome.org/gdk/stable/GdkDisplay.html it says its members are private and should not be accessed directly, but this "keyboard_grab" member was made public just for the propagate call (through it you can access the grabbed window and its event list), which further supports my above statement that this is a hack. Basically the guys tried something new by removing all propagate, then saw some problems and made some hacks to reintroduce it until Gtk 3.0, but made the hack available only for two messages. I will further investigate this, maybe the offset is also related to these messages. If not, I will submit Ben Jackson's completed fix as a patch to the bug report and then continue on with the offset bug. Cheers, Mihai On Fri, Oct 14, 2011 at 11:01 PM, Mihai Cozma <[email protected]> wrote: > Hmm, is part B of the bug suppose to also have cursor flickering? When > I use tablet's pen and I get close to surface, the cursor starts > flickering. Then the drawing is very very very slow, it is about half > a second after I finished the stroke, and it has interruptions all > over it. It is like drawing dashed lines or something, like with each > dash you have just put the pen down again and started painting. Very > odd. > > On Fri, Oct 14, 2011 at 10:05 PM, Mihai Cozma <[email protected]> wrote: >> Ok, I got it working !! :) >> Thanks to all who were so patient to help me in all my newbie questions! >> >> I applied Martin's patches and now there is no crash, but the offset >> problem is obvious, and also the no pressure present problem (B and >> C). >> >> I think the offset problem is more important first, so I will focus on >> that one. It looks like it draws with an offset but sometimes (at >> regular intervals, depending on the drawing speed) it will draw lines >> between the offset point and the correct point (where the cursor is). >> I guess it draws a lot of those, since it takes some times for the >> stroke to be rendered, as opposed to mouse drawing where it is drawn >> instantly. That is why I think this is the most important issue, the >> second one being the pressure sensitivity one, once you can draw at >> least as good as you are drawing with a mouse. >> >> Thanks again, >> Mihai >> >> On Fri, Oct 14, 2011 at 1:49 PM, Mihai Cozma <[email protected]> wrote: >>> Hmm, I've tracked it down to this: >>> >>> (in http://git.gnome.org/browse/gtk+/tree/demos/Makefile.am?h=gtk-2-24) >>> >>> test-inline-pixbufs.h: apple-red.png gnome-foot.png >>> $(GDK_PIXBUF_CSOURCE) --raw --build-list \ >>> apple_red $(srcdir)/apple-red.png \ >>> >>> So it looks $(GDK_PIXBUF_CSOURCE) returns "no", and then of course it >>> complains it cannot find the no command. Any idea where should I set >>> that environment variable and which value should I put in? >>> >>> Or maybe I should comment out this part? >>> >>> Thanks. >>> Mihai >>> >>> On Fri, Oct 14, 2011 at 10:42 AM, Martin Renold <[email protected]> wrote: >>>> I don't think I had this problem, but try to: >>>> - remove the "demos" subdir from Makefile.am >>>> - install a newer version of automake/autoconf maybe >>>> >>>> Regards >>>> Martin >>>> >>>> On Fri, Oct 14, 2011 at 10:25:21AM +0300, Mihai Cozma wrote: >>>>> Ok, it looks like some gtk demons don't build and I get some >>>>> impossible error (might be a typo in the Makefile?): >>>>> >>>>> make[2]: Entering directory >>>>> `/home/meeshoo/dev/gnome/jhbuild.mingw.gtk-2.24/checkout.dbg/gtk+/demos' >>>>> no --raw --build-list \ >>>>> apple_red ./apple-red.png \ >>>>> gnome_foot ./gnome-foot.png \ >>>>> > test-inline-pixbufs.h \ >>>>> || (rm -f test-inline-pixbufs.h && false) >>>>> /bin/bash: no: command not found >>>>> make[2]: *** [test-inline-pixbufs.h] Error 1 >>>>> >>>>> Any tips? (couldn't find a "no" application). >>>>> >>>>> On Fri, Oct 14, 2011 at 3:01 AM, Mihai Cozma <[email protected]> >>>>> wrote: >>>>> > Looks like it worked with 2.22.1, thanks for the tip. Glade (was also >>>>> > on the build list but failed, but I guess it is not a requirement so I >>>>> > ignored it). >>>>> > >>>>> > Haven't tested on windows yet hope it works :) >>>>> > >>>>> > On Fri, Oct 14, 2011 at 2:08 AM, Jon Nordby <[email protected]> wrote: >>>>> >> On 13 October 2011 23:27, Mihai Cozma <[email protected]> wrote: >>>>> >>> OK, managed to get glib compiled, but now on gdk-pixbuf I get >>>>> >>> >>>>> >>> "configure: error: Package requirements (glib-2.0 >= 2.31.0) were not >>>>> >>> met: >>>>> >> >>>>> >> Use an older version of gdk-pixbuf, not master. Like a stable release >>>>> >> a couple versions back. >>>>> >> >>>>> >>> Requested 'glib-2.0 >= 2.31.0' but version of GLib is 2.28.1 >>>>> >>> >>>>> >>> Consider adjusting the PKG_CONFIG_PATH environment variable if you >>>>> >>> installed software in a non-standard prefix. >>>>> >>> >>>>> >>> Alternatively, you may set the environment variables >>>>> >>> BASE_DEPENDENCIES_CFLAGS >>>>> >>> and BASE_DEPENDENCIES_LIBS to avoid the need to call pkg-config. >>>>> >>> See the pkg-config man page for more details. >>>>> >>> make: *** [config.status] Error 1" >>>>> >>> >>>>> >>> I did try to ignore the issue but in the end it didn't build correctly >>>>> >>> something and failed on make install. I first tried with gdk-pixbuf >>>>> >>> master alone, then after it didn't work I checked out the version you >>>>> >>> said in your notes and applied the patch, but the 2.31.0 requirements >>>>> >>> still stands, so blocked here. >>>>> >>> >>>>> >>> After ignoring the above I got an error on gtk+ (probably related to >>>>> >>> gdk-pixbuf): >>>>> >>> "gdk/tests/Makefile.am:16: variable `check_gdk_cairo_SOURCES' is >>>>> >>> defined but no program or >>>>> >>> gdk/tests/Makefile.am:16: library has `check_gdk_cairo' as canonical >>>>> >>> name (possible typo) >>>>> >>> gdk/tests/Makefile.am:19: variable `check_gdk_cairo_LDADD' is defined >>>>> >>> but no program or >>>>> >>> gdk/tests/Makefile.am:19: library has `check_gdk_cairo' as canonical >>>>> >>> name (possible typo) >>>>> >>> gtk/tests/Makefile.am:60: variable `crossingevents_SOURCES' is defined >>>>> >>> but no program or >>>>> >>> gtk/tests/Makefile.am:60: library has `crossingevents' as canonical >>>>> >>> name (possible typo) >>>>> >>> gtk/tests/Makefile.am:66: variable `filechooser_SOURCES' is defined >>>>> >>> but no program or >>>>> >>> gtk/tests/Makefile.am:66: library has `filechooser' as canonical name >>>>> >>> (possible typo) >>>>> >>> gtk/tests/Makefile.am:67: variable `filechooser_LDADD' is defined but >>>>> >>> no program or >>>>> >>> gtk/tests/Makefile.am:67: library has `filechooser' as canonical name >>>>> >>> (possible typo) >>>>> >>> gtk/tests/Makefile.am:61: variable `crossingevents_LDADD' is defined >>>>> >>> but no program or >>>>> >>> gtk/tests/Makefile.am:61: library has `crossingevents' as canonical >>>>> >>> name (possible typo)" >>>>> >>> >>>>> >>> Hopefully you can make some sense of it. >>>>> >>> >>>>> >>> Thanks, >>>>> >>> Mihai >>>>> >>> >>>>> >>> >>>>> >>> On Thu, Oct 13, 2011 at 11:37 AM, Mihai Cozma <[email protected]> >>>>> >>> wrote: >>>>> >>>> Thanks. >>>>> >>>> >>>>> >>>> Indeed, I did only what was in the notes, I have applied patch but >>>>> >>>> that is all. In the meantime I skipped the glib and everything built >>>>> >>>> OK except the other libs that depend on glib themselves. >>>>> >>>> >>>>> >>>> So giving another try tonight, I'll keep you updated, >>>>> >>>> Mihai >>>>> >>>> >>>>> >>>> PS: Steep learning curve, but not impossible :) >>>>> >>>> >>>>> >>>> On Thu, Oct 13, 2011 at 9:44 AM, Martin Renold <[email protected]> >>>>> >>>> wrote: >>>>> >>>>> On Thu, Oct 13, 2011 at 02:25:50AM +0300, Mihai Cozma wrote: >>>>> >>>>>> No matter what I do I get this: >>>>> >>>>>> >>>>> >>>>>> *** Checking out glib *** [4/17] >>>>> >>>>>> git show-ref --quiet --verify refs/heads/win32-2.28.1 >>>>> >>>>>> git checkout --track -b win32-2.28.1 origin/win32-2.28.1 >>>>> >>>>>> fatal: git checkout: updating paths is incompatible with switching >>>>> >>>>>> branches. >>>>> >>>>>> Did you intend to checkout 'origin/win32-2.28.1' which can not be >>>>> >>>>>> resolved as commit? >>>>> >>>>> >>>>> >>>>> That's because I named my local git branch "win32-2.28.1" and I >>>>> >>>>> didn't >>>>> >>>>> really expect to publish my build environment. >>>>> >>>>> See >>>>> >>>>> http://maxy.homeip.net/misc/jhbuild.mingw.gtk-2.24_maxy_notes/notes.txt >>>>> >>>>> >>>>> >>>>> After running the commands there in the glib directory: >>>>> >>>>> git checkout 2.28.1 >>>>> >>>>> git am < 0001-hack-disable-dbus.patch >>>>> >>>>> (You need to download >>>>> >>>>> http://maxy.homeip.net/misc/jhbuild.mingw.gtk-2.24_maxy_notes/0001-hack-disable-dbus.patch) >>>>> >>>>> You can create a branch with the same name with: >>>>> >>>>> git checkout -b win32-2.28.1 >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> Martin Renold >>>>> >>>>> >>>>> >>>> >>>>> >>> >>>>> >>> _______________________________________________ >>>>> >>> Mypaint-discuss mailing list >>>>> >>> [email protected] >>>>> >>> https://mail.gna.org/listinfo/mypaint-discuss >>>>> >>> >>>>> >> >>>>> >> >>>>> >> >>>>> >> -- >>>>> >> Jon Nordby - www.jonnor.com >>>>> >> >>>>> > >>>>> >>>>> _______________________________________________ >>>>> Mypaint-discuss mailing list >>>>> [email protected] >>>>> https://mail.gna.org/listinfo/mypaint-discuss >>>>> >>>> >>>> -- >>>> Martin Renold >>>> >>> >> > _______________________________________________ Mypaint-discuss mailing list [email protected] https://mail.gna.org/listinfo/mypaint-discuss
