fixed buttons and menubuttons that spawn menus not undrawing properly bug.. :)

SVN revision: 138
This commit is contained in:
Carsten Haitzler 1999-09-01 02:42:58 +00:00
parent ce0d7dab75
commit c19963d967
3 changed files with 59 additions and 9 deletions

View File

@ -1,11 +1,11 @@
BUGS:
kainx: translucent and group window moves if move != opaque - fix :)
raster: handling exposes during move and resize modes > 0 (dont do it)
raster: all buttons that launch menus done unpress
raster: must update dox docs fully
raster: group properties are not remembered :(
raster: in E-docs interactive.sh gets hosed on make clean
mark: grab cursor and confine to root window when moving windows / resizing.
mark: focus swtiching in multihead between the heads gets confused... :)
FEATURES:
kainx: reduce need for tooltip text to have auto gened tooltips work

View File

@ -310,18 +310,13 @@ HideButton(Button * b)
void
DrawButton(Button * b)
{
EDBUG(3, "DrawButton");
IclassApply(b->iclass, b->win, b->w, b->h, 0, 0, b->state, 0);
if (b->label)
{
TclassApply(b->iclass, b->win, b->w, b->h, 0, 0, b->state, 0,
b->tclass, b->label);
}
/* there was some other code here that didn't actually do anything useful */
TclassApply(b->iclass, b->win, b->w, b->h, 0, 0, b->state, 0,
b->tclass, b->label);
EDBUG_RETURN_;
}

View File

@ -287,12 +287,43 @@ ShowMenu(Menu * m, char noshow)
if ((m->num <= 0) || (!m->style))
EDBUG_RETURN_;
if (m->stuck)
EDBUG_RETURN_;
{
Button *button;
EWin *ewin99;
if ((button = FindButton(mode.context_win)))
{
button->state = STATE_NORMAL;
DrawButton(button);
}
else if ((ewin99 = FindEwinByDecoration(mode.context_win)))
{
int i99;
for (i99 = 0; i99 < ewin99->border->num_winparts; i99++)
{
if (mode.context_win == ewin99->bits[i99].win)
{
ewin99->bits[i99].state = STATE_NORMAL;
ChangeEwinWinpart(ewin99, i99);
i99 = ewin99->border->num_winparts;
}
}
}
EDBUG_RETURN_;
}
if (!m->win)
RealizeMenu(m);
ewin = FindEwinByMenu(m);
if (ewin)
{
if ((mode.button) && FindItem((char *)mode.button, 0, LIST_FINDBY_POINTER,
LIST_TYPE_BUTTON))
{
fprintf(stderr, "setting back to normal\n");
mode.button->state = STATE_NORMAL;
DrawButton(mode.button);
}
RaiseEwin(ewin);
EDBUG_RETURN_;
}
@ -386,6 +417,30 @@ ShowMenu(Menu * m, char noshow)
m->stuck = 0;
if (!FindMenu(m->win))
AddItem(m, m->name, m->win, LIST_TYPE_MENU);
{
Button *button;
EWin *ewin99;
if ((button = FindButton(mode.context_win)))
{
button->state = STATE_NORMAL;
DrawButton(button);
}
else if ((ewin99 = FindEwinByDecoration(mode.context_win)))
{
int i99;
for (i99 = 0; i99 < ewin99->border->num_winparts; i99++)
{
if (mode.context_win == ewin99->bits[i99].win)
{
ewin99->bits[i99].state = STATE_NORMAL;
ChangeEwinWinpart(ewin99, i99);
i99 = ewin99->border->num_winparts;
}
}
}
}
EDBUG_RETURN_;
}