Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Create a Modal Dialog: (5 Items)
   
Create a Modal Dialog  
We are using PhWindowOpen to create windows/frames/dialogs (we are *not* using widgets). Is there any way to make a 
window modal?
Re: Create a Modal Dialog  
1. You need to write your own window manager event handler. Your code should decide when to allow/disallow window focus 
change for example on a click. This evolves setting up your regions' sensitivity correctly – check out the 
PhWindowEvent_t docs.

2. You may not need to run pwm.
Re: Create a Modal Dialog  
That's what I was thinking I would have to do. I was *hoping* I could get the wm to do it for me.

I already have my own event handler loop and was thinking I could have it throw away all mouse, keyboard and wm events 
and only process the expose event. I think I would also have to modify all other windows (that are part of my app) so 
that they  can't be brought to the foreground.
Re: Create a Modal Dialog  
Within one app, you can try to use PhWindowChange() and set info.state_f (PhWindowInfo_t) to  [~]Ph_WM_STATE_ISBLOCKED.
Re: Create a Modal Dialog  
Good idea. I'll give that a try.