Pointer/screen problems, part two



Turns out there is another problem as well - when a pointer
grab is in effect, you can get pointer events where
x_root/y_root are relative to a different screen than
event->window, but there is no way to detect it.

My possibly crazy idea for fixing this:

Add:
  
 gboolean g_mem_chunk_owns (GMemChunk *mem_chunk,
                            gpointer   mem);

[ This is cheap to implement currently, could get a little
  more expensive if we reimplement GMemChunk not to have an
  area tree, but should always be possible ]

Then we can have a:

 void gdk_event_set_screen (GdkEvent *event);

That works for events allocated with _gdk_event_new()
but not for stack allocated evens.

And a:

 GdkScreen *gdk_event_get_screen (GdkEvent *event);

That returns the value from gdk_event_set_screen() if 
applicable, and otherwise works from event->window.

Reactions?
                                        Owen



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