Expose events not occurring from gdk_window_invalidate_rect
- From: Douglas Vechinski <douglas vechinski dynetics com>
- To: gtk-list gnome org, gtkglext-list gnome org, gtk-app-devel-list gnome org
- Cc:
- Subject: Expose events not occurring from gdk_window_invalidate_rect
- Date: Fri, 05 Aug 2005 09:21:27 -0500
I sent this problem out a few days ago and never heard anything. This
is a modified form of it plus I've attached a stripped down version of
the code which demonstrates the problem (at least on my platforms).
I'm having a problem with an application I am developing to display a 3D
object in a drawing area widget that uses OpenGL via the GtkGLExt
extension. I've mainly developed the application under Linux. I have
the drawing area setup to act on configure, expose, button press, button
release, and button motion signal/events. If the window is reconfigured
the drawing area widget expands. If you press a mouse button and drag
the object is rotated as the mouse moves. (After getting the mouse
movement I call a gdk_window_invalidate_rect() so that an expose event
is created and the expose callback draws the object in the updated
state.
This was working under Linux, then I was needing to create a Windows
version and discovered this problem under there. The problem also
occurs under Linux now as I'll explain further down.
The problem I am having is that depending upon the size of the drawing
area window, the expose event handler (to redraw the scene) is not
called after I issue a gdk_window_invalidate_rect. When I click and
drag mouse button 1 up and down, the object is supposed to rotate. The
motion event handler is being called (added printf statements) which
issues a gdk_window_invalidate_rect. But the expose event handler is
not called. If I enlarge the window horizontally (not vertically), at
some point (size) the behavior starts to work correctly. This is
occurring Linux, XP, and 2000, just that the size of the window where
things start to work correctly differs. (After encountering this
problem under Windows, I shrank the initial size of the display window
under Linux and experienced similar problems.)
I've attached a really stripped down version of the code. (The main
interface section was created by glade-2.) I had at one point stripped
out all the widgets except the drawing area, but when I did that, I
didn't have a problem that I was aware of. For simplicity, the object
that is drawn is just a line. Dragging mouse 1 up and down is supposed
to rotate the line. Dragging Mouse 2 up or down zooms. The Reset View
button switches between red and green. Depending upon the platform
these "effects" don't work until one stretchs the window beyond a
certain size. On Linux I was using gtk+2.4.13-9. On Windowx XP,
compiled using the MSYS environment along with the GTK+ 2.4.14 (Tor)
libraries. Similar for the Win 2000 platform. (You will need to
install the gtkglext package/libs for this code).
I'd appreciate if anyone can confirm this problem and know what the
cause is.
-----------------------------------------------------------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]