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:
@@ -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*
|
||||
|
||||
Reference in New Issue
Block a user