Re: Question about GtkButton->event_window.
- From: Tristan Van Berkom <vantr touchtunes com>
- To: Tom Liu <tom liu flextrade com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Question about GtkButton->event_window.
- Date: Wed, 18 Feb 2004 11:20:39 -0500
Tom Liu wrote:
I check the source code of GtkButton, Looks the GtkButton create a
GdkWindow called event_window. and GtkButton->event_window coves the
GtkWidget->window. But When expose event comes, they paint the button on
the GtkWidget->window. How can the button's images show up?
Why the GtkButton don't use the GtkWidget->window as it's own GdkWindow?
I cant tell you *exactly* but here's an educated guess:
(GTK_WIDGET_FLAGS(GTK_WIDGET(button)) & GTK_NO_WINDOW)
is true, so a button will draw to the widget->window (which belongs
to the parent), but since the GdkWindow (and effectivly the X
window) widget->window is bigger than the button, an "event_window"
is used to trap X's "enter-notify"/"leave-notify" in order to
implement prelight states and not execute extra code when the parent
window recieves mouse-overs.
Maykazecents ?
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]