Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-26-2018, 09:14 AM   #1
aleq
Enthusiast
aleq began at the beginning.
 
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
Attached Thumbnails
Click image for larger version

Name:	kindle-application_error.png
Views:	179
Size:	764.5 KB
ID:	165215   Click image for larger version

Name:	kindle-wifi.PNG
Views:	172
Size:	601.0 KB
ID:	165216  
aleq is offline   Reply With Quote
Old 07-26-2018, 01:21 PM   #2
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
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.
NiLuJe is offline   Reply With Quote
Old 07-26-2018, 05:56 PM   #3
aleq
Enthusiast
aleq began at the beginning.
 
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:
Uses xdotool (thanks for the right direction) to get the active window.
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
aleq is offline   Reply With Quote
Reply

Tags
dialog, internal error, popup, wifi connection dialog


Forum Jump

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


All times are GMT -4. The time now is 09:39 AM.


MobileRead.com is a privately owned, operated and funded community.