Re: visual selection of an area of the root window



On Sat, May 03, 2003 at 01:11:16PM -0700, Lars Damerow wrote:

I'm writing a GTK-based screen recording application. It needs to have a
facility for allowing the user to make a rubber-band selection of an area of
the root window.

Does anyone have any suggestions for a clean way to do this? I imagine it'd
involve making a transparent window with no decorations to cover the root
window while the user selects an area.


There are two basic approaches:

 - use a shaped window; in metacity, there's code in tabpopup.c
   showing how to do an "outline" shaped window

 - grab the X server and draw/undraw with IncludeInferiors using XOR

Neither one is really that nice, though.

Havoc



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