Re: cleaned up WM state patch



On 28 Feb 2001, Havoc Pennington wrote:

> 
> Tim Janik <timj gtk org> writes: 
> > <sigh> what's wrong with GDK_WINDOW_OBJECT() ?
> > 
> 
> <sigh> It isn't used a single time in gdkwindow-x11.c. I do my best to

that's probably because gdkwindow-x11.c got transitioned over from
gdkwindow.c in 1.2 which operated on GdkWindowPrivate which was
not an object registered with the type system. the fact that during
the transition the casts weren't adapted doesn't make it right to use
them from now on, instead gdkwindow-x11.c and friends need correction.

> be consistent with existing code since I assume that indicates the
> proper convention in a given situation, and consistency is a good
> thing anyhow.

consistency is worth nothing when it comes to repeating failures.

> <sigh> All public entry points in gdkwindow-x11.c are already guarded
> or should be guarded by GDK_IS_WINDOW(), this is private internal
> stuff, where we frequently omit checks last I heard.

nice, i haven't heared that, and the majority of gtk code doesn't look
that way either.

> <sigh> If some people documented their preferred conventions it would
> be easier to follow them.

that's probably right. however for the specific case of using GTK_WIDGET()
over (GtkWidget*) i would have expected you to be aware of that convention
after being in touch with gtk code for several years.

> <sigh> Maybe there is no point in expressing exasperation via <sigh>
> for trivial typo-level mistakes, you could e.g. just check in a fix,
> or just point out the problem, especially when the point in question
> is some obscure principle not even Owen is aware of.

owen isn't aware that we use casting macros instead of plain casts
for type system registered types, and it's an obscure principle?
i find that hard to believe. maybe you should ask him first what all
those macros are about that you get through a grep GTK_CHECK_CAST,
and only then make claims about his knowledge.

---
ciaoTJ









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