Re: GdkWindow clean up for offscreen redirection



hi

   i tried using the offscreen patch, but has a doubt regarding pixmaps.
What i did is , added gtkentry as a child of gtkoffscreenBox widget.
And than tried setting event mask GDK_VISIBILITY_NOTIFY_MASK using gtk_widget_add_event (after realizing)

I expected to get a signal for visibility-notify-event, but no signal was emitted
So i looked through the GdkWindow.c and GdkOffscreenWindow.c and found that iface->set_events has been overridden  to
gdk_offscreen_window_set_events which just updates the  event_mask for GDK_WINDOW_OBJECT and doesn't propagates to default backend handler
gdk_window_x11_set_events

So what i want to know (as i am not familiar with Xserver), is
Can't we ask xserver to set event mask for pixmaps , if  so, it means i can not set any event mask using gtk_widget_add_events to offscreen child widgets.

what can be the solution for adding event mask to offscreen child widgets

bye
varun

On Wed, Feb 27, 2008 at 5:11 PM, Emmanuele Bassi <ebassi gmail com> wrote:
hi all;

the original offscreen redirection patch[1] introduced a clean up work
for GdkWindow[2] in order to implement the offscreen GdkWindow object.

since this affects the various GDK backends, I think it should go
through a round of discussion first.

the offscreen redirection patch needs to implement a GdkOffscreenWindow
class which redirects itself, and every child window, into an offscreen
pixmap. this means that the GdkWindow API should be implementable not
only on a per-backend basis but also by any internal, backend-agnostic
class. in order to achieve that, a GdkWindowImpl interface has been
added, and every GdkWindow<Backend> class must implement it.

this moves all the per-backend public API into GdkWindow, proxying the
GdkWindowImpl vtable functions. the value of this patch, aside from
making it possible to actually implement GdkOffscreenWindow as a
GdkWindow subclass, is also in the clean up itself, which removes a lot
of crud and makes it easier (in my opinion) to implement backends.

I'd like a comment on the patch from the various backends maintainers so
that we can push the clean up forward and have it land in trunk.

ciao,
 Emmanuele.

+++

[1] http://bugzilla.gnome.org/show_bug.cgi?id=318807
[2] the patch has been broken down here:
   http://bugzilla.gnome.org/attachment.cgi?id=104923&action="">
   
http://bugzilla.gnome.org/attachment.cgi?id=104924&action="">
   
http://bugzilla.gnome.org/attachment.cgi?id=104925&action="">
   
http://bugzilla.gnome.org/attachment.cgi?id=104926&action="">
   
http://bugzilla.gnome.org/attachment.cgi?id=104927&action="">

   the last attachment is the port of the X11 backend to the new
   GdkWindowImpl interface.

--
Emmanuele Bassi,
W:
http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net

_______________________________________________
gtk-devel-list mailing list
gtk-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list



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