1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-15 21:45:54 +01:00

- updated code to use the new runmodal loop where necessary.

- made the WMRunModalLoop() reentrant (a modal panel can have its own
  modal panel and so on) by saving the modal related information when
  entering the modal loop and restoring it after.
This commit is contained in:
dan
2001-01-10 04:24:11 +00:00
parent bc25a31733
commit 1b41d56ad0
4 changed files with 30 additions and 55 deletions

View File

@@ -1048,8 +1048,11 @@ WMBreakModalLoop(WMScreen *scr)
void
WMRunModalLoop(WMScreen *scr, WMView *view)
{
WMScreen *scr = view->screen;
/* why is scr passed if is determined from the view? */
/*WMScreen *scr = view->screen;*/
int oldModalLoop = scr->modalLoop;
WMView *oldModalView = scr->modalView;
scr->modalView = view;
scr->modalLoop = 1;
@@ -1059,7 +1062,10 @@ WMRunModalLoop(WMScreen *scr, WMView *view)
WMNextEvent(scr->display, &event);
WMHandleEvent(&event);
}
}
scr->modalView = oldModalView;
scr->modalLoop = oldModalLoop;
}
Display*