Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Re: (GTK2) EclipseFixed problem

Hi,

To follow up on that a bit more after talking to Owen about it:

 - Clipping of child widgets to the parent allocation isn't genuinely
   guaranteed by GTK, and the reason is (as usual) the evil of widgets
   with a GdkWindow; e.g. GtkEntry, GtkSpinButton. To clip child
   widgets with a window you would need EclipseFixed to have a
   window - which would result in a world of ugliness.

   A third route is to have EclipseFixed optionally have a window or
   not, depending on whether SWT knows that it will be placing child
   widgets outside the extents of the EclipseFixed. I don't know 
   if this information is available.

 - If you have child GTK_NO_WINDOW widgets that do not clip to
   event->area correctly, you can hack around this by overriding
   expose_event again in EclipseFixed, and calling
   gdk_window_begin_paint_rect() with the intersection of the expose 
   area and the EclipseFixed allocation. (gtk_widget_intersect() can
   be used to compute this I believe.) This has some efficiency cost.

   However GTK widgets generally do clip to expose_event->area.

Havoc



Back to the top