diff -r 2313d53f426a -r 4c1289d5e45a window.c --- a/window.c Mon Dec 04 13:46:03 2006 +0000 +++ b/window.c Mon Dec 04 13:57:04 2006 +0000 @@ -100,10 +100,10 @@ e.we.click.widget = GetWidgetFromPos(w, x, y); if (e.we.click.widget < 0) return; /* exit if clicked outside of widgets */ - wi = &w->widget[e.we.click.widget]; + /* don't allow any interaction if the button has been disabled */ + if (IsWindowWidgetDisabled(w, e.we.click.widget)) return; - /* don't allow any interaction if the button has been disabled */ - if (IsWidgetDisabled(wi)) return; + wi = &w->widget[e.we.click.widget]; if (wi->type & WWB_MASK) { /* special widget handling for buttons*/ @@ -1741,7 +1741,7 @@ const Widget *wi = &w->widget[widget_index]; /* Don't redraw the window if the widget is invisible or of no-type */ - if (wi->type == WWT_EMPTY || IsWidgetHidden(wi)) return; + if (wi->type == WWT_EMPTY || IsWindowWidgetHidden(w, widget_index)) return; SetDirtyBlocks(w->left + wi->left, w->top + wi->top, w->left + wi->right + 1, w->top + wi->bottom + 1); }