- 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 committed 2001-01-10 04:24:11 +00:00
1 parent bc25a31733
commit 1b41d56ad0
4 files changed
+30 -55

No files matched your search

+9 -3
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*