07-26-2018, 09:14 AM | #1 |
Enthusiast
Posts: 25
Karma: 10
Join Date: Mar 2012
Location: CZ, EU
Device: K4NT (4.0.1), KT (5.3.7.3), KPW1 (sold), KPW2
|
Closing popups(dialogs) from commandline?
This is partly related to my other topic: WebLaunch fullscreen browser crash after few hours
As a hobby project, I'm doing a total conversion of my Jail broken KT. It'll run HTML5 page serving as smart home control panel. The problem is the browser crashes once in a while with "Application Error" popup over the screen. Or if the WiFi is unstable and connection is lost, then the conneciton popup is displayed, even if the connection is restored few seconds later. Is there any way how to: - enumerate visible windows/dialogs? To detect there is such popup I want to dismiss? - close it (this is obviously the most important) I tried even to stop/restart framework, but that seems not to help at all. Plus I believe I have seen a topic somewhere here at mobileread.com mentioning a way how to find out visible window or something like that. Unfortunately I haven't saved it and I cannot find it anymore. Thanks in advance for any tip Aleq |
07-26-2018, 01:21 PM | #2 |
BLAM!
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
It's running the awesome WM (i.e., it's X11), so my gut says "yes", even if you can't find anything better than faking touch input events once you know where to tap, although I've never looked into that myself.
EDIT: There were possibly a few threads playing around the concept with the xdotool utility. Last edited by NiLuJe; 07-26-2018 at 01:23 PM. |
07-26-2018, 05:56 PM | #3 |
Enthusiast
Posts: 25
Karma: 10
Join Date: Mar 2012
Location: CZ, EU
Device: K4NT (4.0.1), KT (5.3.7.3), KPW1 (sold), KPW2
|
Wooohooo
Code:
xwininfo -id `./xdotool getactivewindow` | grep "\"L:D" && ./wmctrl -c :ACTIVE: Then uses xwininfo to get the window name, if it contains L, it is a dialog Then uses wmctrl to close the active window gracefully It may be enough to wmctrl -p -G -l and check for any dialog in the list perhaps |
Tags |
dialog, internal error, popup, wifi connection dialog |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
annoying popups | rikm | Kobo Reader | 2 | 11-21-2017 05:54 AM |
Touch Can Kobo Touch handle 'aside' tags as popups? | Buzko | Kobo Reader | 3 | 04-17-2017 11:30 PM |
CSS trick for url popups solved | ni_c | Editor | 10 | 09-27-2015 09:06 AM |
Long-running tasks and updating dialogs | hakan42 | Development | 2 | 06-15-2013 01:29 AM |
Application pop up dialogs are driving me crazy! | Bob Russell | Lounge | 21 | 05-19-2007 04:22 PM |