Re: expose event following button press/release event



Yes, I handled the two button events myself, and both return true.
There are not anything related with GtkWidgets in my app, I directly use cairo to draw my UI elements, and gtk+ is just used to handle the event.

On Mon, May 18, 2009 at 9:00 PM, Paul Davis <paul linuxaudiosystems com> wrote:
On Mon, May 18, 2009 at 5:33 AM, Tony Wang <wangtao adi gmail com> wrote:
> Hi Guys,
> Why there is always one expose-event after
> the button-press-event(and button-release-event)? that means my app redraw
> itself twice for one button event, which made the app UI flickers, any clues
> for settling the problem?

handle the button press & release events yourself, and return true
from your handlers, thus preventing the default handler from running.
it sounds as if you don't want a GtkButton anyway, but something more
like a GtkEventBox that simply receives button events without
redrawing itself to indicate state to the user.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]