mirror of
https://github.com/gryf/wmaker.git
synced 2026-11-23 16:06:55 +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:
1 parent
bc25a31733
commit
1b41d56ad0
4 files changed
+30
-55
No files matched your search
+9
-3
@@ -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