Re: Global motion events



Owen Taylor wrote:
On Sat, 2005-05-14 at 13:49 +1000, Russell Shaw wrote:


 2. The need to have windows to catch mouse events in itself

is a problem. It's a frequent GTK+ FAQ, GTK+ widgets like GtkLabel have complex logic for sometimes adding an event
   widget, and an artificial restriction is introduced for
   for drag sources and tooltips.

Why doesn't every widget have an X window?


The basic reason is that it looks a lot better if most widgets
draw *on* the parent window, rather than having a separate rectangular window they draw into. This allows them to merge with the parent background, to have smooth shaped outlines,
to have alpha channels, and so forth.

It also allows smoother relayout (you don't have synchronization
problems between relayout and redraw). And is somewhat more
efficient.

Regards,
					Owen

It makes things more complicated when some widgets have windows and
others don't. It would be good if gtk was simplified by making every
widget have an X window and work the same way, and enhancements to
the X windows were put into the X server. It would make the X server
non-standard, but it needs updating anyway. If all the client-side
anti-aliased rendering and fonts etc were put into the X server, then
gtk would be smaller and faster.



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