lc-soft / LCUI

C library for building user interfaces
https://lcui-dev.github.io
MIT License
4.12k stars 356 forks source link

Modal Window Still Clickable #261

Closed TheSystemIsCorrupt closed 2 years ago

TheSystemIsCorrupt commented 2 years ago

Describe the bug If we make a window modal while using lcui window will be still clickable and it just stop update rendering.

To Reproduce Steps to reproduce the behavior:

  1. Create your application
  2. Create a button
  3. Execute a message box on button click
  4. Click on the button again without closing message box

Expected behavior Inputs must be blocked when a window is in modal mode.

Environment (please complete the following information):

lc-soft commented 2 years ago

Message box ? Did you create it by calling the MessageBox() function of Win32 API?

TheSystemIsCorrupt commented 2 years ago

Yes

lc-soft commented 2 years ago

You can try to block event handling before calling MessageBox():

Widget_BlockEvent(LCUIWidget_GetRoot(), TRUE);