How to lock main window when notification dialog is open?
#1
Hi

How to lock main window when notification dialog is open?
It is necessary to block all actions, key buttons on remote control or keyboard, while dialog box is displayed. When window disappears, remove all locks.

What code need to be inserted into DialogNotification.xml?

th.
Reply
#2
I guess you could use a fake button to block action.
So you'd need <defaultcontrol>BUTTON-ID<defaultcontrol> or <onload>setfocus(BUTTON-ID)</onload>

then add in controls a hidden button control type with:
<onback>noop</onback> and same for onright/onleft/onup/ondown...
Reply
#3
(2019-03-14, 13:43)cartman.dos Wrote: I guess you could use a fake button to block action.
So you'd need <defaultcontrol>BUTTON-ID<defaultcontrol> or <onload>setfocus(BUTTON-ID)</onload>

then add in controls a hidden button control type with:
<onback>noop</onback> and same for onright/onleft/onup/ondown...
Thanks for answering.
It did not help, everything remained as well, here is my code in DialogNotification.xml:
xml:

<?xml version="1.0" encoding="UTF-8"?>
<window>
    <defaultcontrol>410</defaultcontrol>
    <onload>setfocus(410)</onload>

    <controls>
        
        <control type="group">
        
            <control type="button" id="410">
                <label>test</label>
                <left>0</left>
                <top>0</top>
                <width>10</width>
                <height>10</height>
                <font>font_Title</font>
                <textcolor></textcolor>
                <texturefocus border="0"></texturefocus>
                <texturenofocus border="0"></texturenofocus>
                <onback>noop</onback>
                <onleft>noop</onleft>
                <onright>noop</onright>
                <onup>noop</onup>
                <ondown>noop</ondown>
             </control>
...
Reply
#4
(2019-03-14, 13:56)noolinrut Wrote:
(2019-03-14, 13:43)cartman.dos Wrote: I guess you could use a fake button to block action.
So you'd need <defaultcontrol>BUTTON-ID<defaultcontrol> or <onload>setfocus(BUTTON-ID)</onload>

then add in controls a hidden button control type with:
<onback>noop</onback> and same for onright/onleft/onup/ondown...
Thanks for answering.
It did not help, everything remained as well, here is my code in DialogNotification.xml:
xml:

<?xml version="1.0" encoding="UTF-8"?>
<window>
    <defaultcontrol>410</defaultcontrol>
    <onload>setfocus(410)</onload>

    <controls>
        
        <control type="group">
        
            <control type="button" id="410">
                <label>test</label>
                <left>0</left>
                <top>0</top>
                <width>10</width>
                <height>10</height>
                <font>font_Title</font>
                <textcolor></textcolor>
                <texturefocus border="0"></texturefocus>
                <texturenofocus border="0"></texturenofocus>
                <onback>noop</onback>
                <onleft>noop</onleft>
                <onright>noop</onright>
                <onup>noop</onup>
                <ondown>noop</ondown>
             </control>
...
 
 check in skin debug mode, is this control is getting focused when notification pops?
Reply
#5
Not focused. What to do?
Reply
#6
I just wonder why wouldn't get focused in the first place and if creating a custom window that is visible while notification, then doing the same idea with the button will work instead  Huh
Reply
#7
(2019-03-14, 16:04)cartman.dos Wrote: I just wonder why wouldn't get focused in the first place and if creating a custom window that is visible while notification, then doing the same idea with the button will work instead  Huh
 I did not understand what you meant. I use Home.xml and DialogNotification.xml, there are no custom windows.
Reply
#8
(2019-03-14, 18:40)noolinrut Wrote:
(2019-03-14, 16:04)cartman.dos Wrote: I just wonder why wouldn't get focused in the first place and if creating a custom window that is visible while notification, then doing the same idea with the button will work instead  Huh
 I did not understand what you meant. I use Home.xml and DialogNotification.xml, there are no custom windows. 
 Try adding in dialognotification:
Code:
<onload>ActivateWindow(busydialognocancel)</onload>
<onunload>Dialog.close(busydialognocancel)</onunload>

Then you could hide busy dialog if you want in dialogbusy.xml
Code:
<visible>!Window.IsVisible(notification)</visible>
Reply
#9
Thank you very much! Such a hack worked!
Reply

Logout Mark Read Team Forum Stats Members Help
How to lock main window when notification dialog is open?0