On Sun, 2005-05-15 at 00:03 +1000, Russell Shaw wrote: > 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. We could debate at length what the best use of subwindows is (if I was starting from scratch, my approach would likely be *no* subwindows at all), but it's really pretty pointless since there are no plans for an incompatible version of GTK+ at this point. And either adding windows to all widgets or eliminating all subwindows is an incompatible change. Regards, Owen
Attachment:
signature.asc
Description: This is a digitally signed message part