#undef HAVE_XIM
#endif
-extern GtkContainerClass *pizza_parent_class;
-
//-----------------------------------------------------------------------------
// documentation on internals
//-----------------------------------------------------------------------------
GdkEventExpose *gdk_event,
wxWindowGTK *win )
{
- if (gdk_event->count > 0) return FALSE;
-
- draw_frame( widget, win );
-
- (* GTK_WIDGET_CLASS (pizza_parent_class)->expose_event) (widget, gdk_event);
-
- return TRUE;
+ if (gdk_event->count == 0)
+ draw_frame(widget, win);
+ return false;
}
}
win->GtkSendPaintEvents();
// Let parent window draw window-less widgets
- (* GTK_WIDGET_CLASS (pizza_parent_class)->expose_event) (widget, gdk_event);
-
return FALSE;
}
}
if ((win->m_wxwindow) && (win->GetLayoutDirection() == wxLayout_RightToLeft))
{
// origin in the upper right corner
- int virtual_width = win->GetVirtualSize().x;
int window_width = gtk_pizza_get_rtl_offset( GTK_PIZZA(win->m_wxwindow) );
- //wxPrintf( wxT("event.m_x %d virtual_width %d window_width %d m_xoffset %d\n"),
- // event.m_x, virtual_width, window_width, GTK_PIZZA(win->m_wxwindow)->m_xoffset );
event.m_x = window_width - event.m_x;
}
{
// these get reported to wxWidgets -> wxPaintEvent
- gtk_pizza_set_external( GTK_PIZZA(m_wxwindow), TRUE );
-
g_signal_connect (m_wxwindow, "expose_event",
G_CALLBACK (gtk_window_expose_callback), this);
dy = gtk_pizza_get_yoffset( pizza );
}
+ if (m_x == -1 && m_y == -1)
+ {
+ GdkWindow *source = (GdkWindow *) NULL;
+ if (m_wxwindow)
+ source = GTK_PIZZA(m_wxwindow)->bin_window;
+ else
+ source = m_widget->window;
+
+ if (source)
+ {
+ int org_x = 0;
+ int org_y = 0;
+ gdk_window_get_origin( source, &org_x, &org_y );
+
+ if (GetParent())
+ GetParent()->ScreenToClient(&org_x, &org_y);
+
+ ((wxWindowGTK*) this)->m_x = org_x;
+ ((wxWindowGTK*) this)->m_y = org_y;
+ }
+ }
+
if (x) (*x) = m_x - dx;
if (y) (*y) = m_y - dy;
}