Solved Can't open a new window since another dialog is still active
#1
Hi,

I'm trying to open a new window of Kodi Settings screen (10004) from the DialogButtonMenu.xml (Which is the power menu that is opened by "S" key)
By this code:
Code:
        <item id="2">
            <property name="id">$NUMBER[2]</property>
            <property name="mainmenuid">12</property>
            <label>$LOCALIZE[5]</label>
            <label2>Custom item</label2>
            <icon>common/settings1.png</icon>
            <thumb />
            <property name="labelID">5</property>
            <property name="defaultID">5</property>
            <onclick condition="Window.IsActive(DialogButtonMenu.xml)">Close</onclick>
            <onclick>ActivateWindow(Settings)</onclick>

            <property name="path">ActivateWindow(Settings)</property>
            <property name="list">Settings</property>
            <visible>String.IsEqual(System.ProfileName,Master user)</visible>
            <property name="group">powermenu</property>
            <property name="isSubmenu">True</property>
          </item>

But when I press on it I get this error in the log: (I marked in bold the error)
Code:
INFO <general>: Enabled debug logging due to GUI setting. Level 2.
DEBUG <general>: Skipped 1 duplicate messages..
DEBUG <general>: ------ Window Init () ------
DEBUG <general>: Keyboard: scancode: 0x20, sym: 0x100, unicode: 0x0000, modifier: 0x65
DEBUG <general>: ------ Window Init (Pointer.xml) ------
DEBUG <general>: Keyboard: scancode: 0x2a, sym: 0x304, unicode: 0x0000, modifier: 0x64
DEBUG <general>: Keyboard: scancode: 0x1d, sym: 0x306, unicode: 0x0000, modifier: 0x0
DEBUG <general>: Keyboard: scancode: 0x1f, sym: 0x115, unicode: 0x0073, modifier: 0x0
DEBUG <general>: CInputManager::HandleKey: s (0xf053) pressed, action is ActivateWindow(ShutdownMenu)
DEBUG <general>: Activating window ID: 10111
DEBUG <general>: ------ Window Init (DialogButtonMenu.xml) ------
DEBUG <general>: ------ Window Deinit (Pointer.xml) ------
DEBUG <general>: Keyboard: scancode: 0x1f, sym: 0x115, unicode: 0x0000, modifier: 0x0
DEBUG <general>: ------ Window Init (Pointer.xml) ------
DEBUG <general>: CInputManager:: ProcessMouse: trying mouse action leftclick
DEBUG <general>: Activating window ID: 10004
 INFO <general>: Activate of window '10004' refused because there are active modal dialogs
RNING <general>: CGUIWindowManager - CGUIWindowManager::HandleAction - ignoring action 107, because topmost modal dialog closing animation is running

DEBUG <general>: Skipped 2 duplicate messages..
DEBUG <general>: ------ Window Deinit (DialogButtonMenu.xml) ------

This is actually the window that prevent the opening of the new window:
VideoOSD.xml
Code:
<window>
    <zorder>2</zorder>
    <onload condition="!VideoPlayer.Content(livetv)">SetFocus($INFO[Skin.String(defaultosdbutton_video)])</onload>
    <onload condition="VideoPlayer.Content(livetv)">SetFocus($INFO[Skin.String(defaultosdbutton_livetv)])</onload>
    <onunload>ClearProperty(subtitlemenu,home)</onunload>
    <controls>
        
        <!--OSD Panel-->
        <control type="group">
            <!-- OSD buttons -->
            <include>OSDButtonsModern</include>
            <animation effect="slide" start="0,400" end="0,0" tween="cubic" easing="out" delay="0" time="250" reversible="false" condition="!Player.ShowInfo + !Skin.HasSetting(LowPerformanceMode)">WindowOpen</animation>
            <animation effect="fade" start="0" end="100" delay="0" time="300" reversible="false" condition="Player.ShowInfo">WindowOpen</animation>
            <animation effect="fade" start="100" end="0" delay="0" time="300" reversible="false" condition="Player.ShowInfo">WindowClose</animation>
            <include>HideOsdConditions</include>
        </control>
    </controls>
</window>

What can I do in order to solve this?

1) How can I know what is the active modal dialog that makes the problem?
2) How can I close this window before activating the new window?
Should I need to do something like this before activating the new window? (Or is there antoher way to close all the active dialogs?)
Code:
<onclick condition="Window.IsActive(VideoOSD.xml)">Close</onclick>
- Or -
How can I close "VideoOSD.xml" when "DialogButtonMenu.xml" is loaded?
I tried to put this one in "DialogButtonMenu.xml" the but it doesn't work:
Code:
<onload condition="Window.IsActive(VideoOSD.xml)">Dialog.Close(VideoOSD.xml)</onload>
Reply
#2
You sure it's not the DialogButtonMenu.xml causing it?
Reply
#3
(2022-01-26, 19:33)Hitcher Wrote: You sure it's not the DialogButtonMenu.xml causing it?

Maybe.
Probably you think that accroding to the log.
But what I do know is that when VideoOSD.xml is closed (Pressing "M" shortcut to close/open it) and activate a window, I don't have this problem,
so the Settings window is opening ok without this error. Ad when VideoOSD.xml is on screen I get this error.

This is the log when the VideoOSD.xml is closed: (Without an error)
Code:
DEBUG <general>: Activating window ID: 10004
DEBUG <general>: ------ Window Deinit (DialogButtonMenu.xml) ------
DEBUG <general>: ------ Window Deinit (MusicVisualisation.xml) ------
DEBUG <general>: FreeVisualisation() done
DEBUG <general>: Skipped 1 duplicate messages..
DEBUG <general>: ------ Window Init (Settings.xml) ------

By the way it relates also to "MusicOSD.xml".
There is something with these windows that prevent opening of another window, even when I delete all their content.
Reply
#4
I found the solution.

In the "DialogButtonMenu.xml" I added these lines:
(I already thought about that, I just didn't use it correctly)
Code:
    <onload condition="Window.IsActive(videoosd)">Dialog.Close(videoosd)</onload>
    <onload condition="Window.IsActive(musicosd)">Dialog.Close(musicosd)</onload>

Edit:
A better solution you can find here: (If the skin is using skinshortcuts)
https://forum.kodi.tv/showthread.php?tid...pid3084200
Reply

Logout Mark Read Team Forum Stats Members Help
Can't open a new window since another dialog is still active0