[Mono-osx] Mono.framework 1.2.6_6 gtk-sharp issues

Bob bob.spamnot at gmail.com
Mon Feb 11 00:00:18 EST 2008


Note that I posted this on the Imendio GTK+ Mac OS X forum as well.

I have tried the new GTK Mac backend contained in the Mono framework
MonoFramework-1.2.6_6.macos10.novell.universal.dmg which was recently
released.  I used in on an application I wrote and am very impressed that
most things work.  Nice job getting this up to speed.  This is close to
being usable.  I am on a PowerBook G4 running Mac OS 10.4.10.

I do have a few issues.  Although I am using mono and gtk-sharp, I suspect
that the problems I am having are in the GTK backend.  The 1st of these is
most important to me, the others are either annoyances or can be worked
around.  But #1 completely changes the behavior of my app.

1. KeyPressEvents seem to be handled differently using the X11 backend and
the Mac backend.  Using X11 ALL keypress events are queued and handled by
the main loop when it gets around to them.  So if I have a big computation
going and hit two key presses, the main loop will see them when the big
computation stops and the main loop runs.  But with the Mac backend key
presses are not be seen by the main loop if they are pressed while a big
computation is running.  They just disappear.  This greatly changes the
behavior of my application (making it very hard to use reliable).

2. I use a Gtk.DrawingArea. It renders the window using pixmaps (in the
background) and then the pixmap is drawn to the Gdk.Window (of the drawing
area) using Gdk.Window.DrawDrawable.  The problem is that using the Mac GTK
backend this does not cause the actual window to get re-drawn (except when
the window is first created).  If I put in an explicit call to
Gdk.Window.InvalidateRect after the call DrawDrawable then it gets re-drawn
but this should not be necessary (and is not necessary using the X11
backend).

3. The keypress events for the function keys do not get recognized.  When I
print them using Console.WriteLine ("KPress: {0}", evnt.Key); they show as
"KPress: 16777232" (instead of KPress: F2, etc).  I am using a PowerBook G4
and have to push the "fn" key while pressing the function key so this could
be playing a role (but it works fine in X11 mode).

4. I use fullscreen mode (Gtk.Window.Fullsceeen) and then Hide the
fullscreen window when I want to go back to my normal window.  This works
well except that the Mac Menu Bar is not re-drawn after the Hide call.  I
should mention that I am impressed that the Fullscreen really uses the
entire screen (including covering up the dock and mac menu bar).  This is
the way it should be and I was afraid that it would not work this was (this
is a step up from the X11 backend on Mac).

5. I use a Gtk.TreeView and the vertical scrollbar sliders are not drawn
(the horizontal ones are drawn).  The vertical scrollbar seems to work fine
but I have to guess where the slider is. I noticed that the gtk-demo program
has this problem also.

6. The emulated mouse buttons do not work.  For example, control click is
suppose to be like a right mouse button (button 2) but instead it shows as a
control and then a click.

7. I get a bunch of "CGBitmapContextGetBitsPerPixel: invalid context"
getting output.  Not sure if this matters.  I also noticed that the gtk-demo
program included in the distribution spits these out as well.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20080210/16ca4e1a/attachment.html 


More information about the Mono-osx mailing list