**** BEGIN LOGGING AT Wed Apr 04 03:00:01 2018 Apr 04 07:44:46 mreow~ Apr 04 07:45:24 any idea how I should check screen state (blank vs on) from an application? Apr 04 07:46:03 ~phone-control Apr 04 07:46:07 ~phonecontrol Apr 04 07:46:08 i guess phonecontrol is http://wiki.maemo.org/Phone_control Apr 04 07:46:32 hmm Apr 04 07:46:33 Yeah, but ... 1. not sure that's what I'm looking for 2. I wonder if there is some hildon/osso function to do it Apr 04 07:46:34 nothing there Apr 04 07:46:41 nah, it wasnt for you Apr 04 07:46:49 just didnt remember the link Apr 04 07:47:01 ? Apr 04 07:47:05 http://wiki.maemo.org/Phone_control#Query_lock_state_of_screen_and_keys Apr 04 07:47:08 maybe that? Apr 04 07:47:11 I don't think so Apr 04 07:47:16 Will return locked or unlocked depending on lock state Apr 04 07:47:30 I want to vibrate even if device is unlocked, as long as screen is blanked Apr 04 07:47:38 (after blanking timeout for instance) Apr 04 07:47:58 I'd happily check Conversation source, but we don't have it :( Apr 04 07:48:14 hmm ... maybe I can check symbols though Apr 04 07:48:50 i think you can check some widget source Apr 04 07:49:01 or nokia programming hints Apr 04 07:49:16 those pages seem pretty empty to me Apr 04 07:49:17 they usually have to stop updating when screen blanked Apr 04 07:49:45 U osso_hw_set_display_event_cb in rtcom-messaging-ui Apr 04 07:51:53 fun, links on http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide use nokia.com Apr 04 07:51:59 yeah :/ Apr 04 07:52:27 I think you should be able to tell the state by looking at something in the associated sysfs node. Apr 04 07:52:32 would be nice to convert them into archive.org links Apr 04 07:52:50 Though maybe if you're writing an actual application, it should go through something else. Apr 04 07:53:35 maxd: well, he simply wants to know lcd power state Apr 04 07:53:40 so sys might be the way Apr 04 07:53:45 as long it's user readable Apr 04 07:54:23 /sys/class/backlight/acx*/brightness Apr 04 07:54:31 eww Apr 04 07:54:43 the lock switch seems to just set that to 0 Apr 04 07:55:00 why eww? fastest and lightest i guess Apr 04 07:55:40 Though I guess theoretically it might be logical for it to set it to 0 anyway (eg, if there's full sunlight, which means the backlight is pointless) Apr 04 07:55:52 (though ime, full sunlight means maximum brightness, not minimum) Apr 04 07:56:08 oh, right Apr 04 07:56:30 http://web.archive.org/web/20110622052725/http://nds2.fds-forum.nokia.com/p/d/fds_forum/a3187f95-ad88-4233-b0ef-a182da3ec1c7/Hildon_2_2_Widget_UI_Specification_v1_0_en.pdf/Hildon_2_2_Widget_UI_Specification_v1_0_en.pdf?fdptoken=1308806843_faa0c37acd80f5e2645b6b6625fd02b8 Apr 04 07:56:55 oh, neat Apr 04 07:57:23 it might still work directly too, without archive.org Apr 04 07:59:03 nothing related to what I'm looking for in this doc though Apr 04 07:59:44 original link no longer works Apr 04 08:05:15 interesting ... rtcom-messaging-ui (conversation) does not even use libnotify ... Apr 04 08:06:01 worse than that, looks like they implemented some builtin notification mechanism Apr 04 08:08:01 http://web.archive.org/web/20120126154837/http://nds2.fds-forum.nokia.com/p/d/fds_forum/55bf1016-809c-411d-8384-83361c073452/Maemo_5_Desktop_Widget_UI_Guidelines_v1_1_en.pdf/Maemo_5_Desktop_Widget_UI_Guidelines_v1_1_en.pdf?fdptoken=1327679314_94d31f4121f17468bd5ad741025d64d7 Apr 04 08:09:17 darn, i recall there was some pdf/page that was talking about when to update widget contents Apr 04 08:09:23 just cant seem to find it Apr 04 08:48:29 alright, so ... there is a MCE dbus request for that (#define MCE_DISPLAY_STATUS_GET "get_display_status") Apr 04 08:54:22 bencoh: get initial state with that "get_display_status" mce method call and then track changes by listening to "display_status_ind" mce signals Apr 04 08:58:34 bencoh: should be documented in mce-dev. I have no idea where maemo version is located, but for mer docs should apply for these "shared ancestry" parts: https://git.merproject.org/mer-core/mce-dev/blob/master/include/mce/dbus-names.h#L222 Apr 04 09:05:35 Hm. I imagine optimally you would know to not bother updating just through X11. Apr 04 09:12:53 VisibilityNotify event, serial 32, synthetic NO, window 0x2c00001, state VisibilityFullyObscured Apr 04 09:13:07 Wonder if that event appears in response to locking the screen. Apr 04 09:14:10 Nope. Apr 04 09:14:25 iirc maemo mce just blanks/unblanks the screen via fbdev ioctls - whether xserver can tap to that, ... I do not recall Apr 04 09:14:57 spiiroin: you're right about fbdev ioctls Apr 04 09:14:58 this is one of the parts that was heavily modified in mer - mce syncs blank/unblank with wayland compositor (in lipstick) Apr 04 09:15:17 at least for the opensource version Apr 04 09:16:26 well, maemo mce is basically mer mce without few years worth of changes Apr 04 09:16:36 yeah Apr 04 09:17:20 Windows don't even seem to be unmapped when switching to other ones on maemo. Apr 04 09:17:48 or notified of any obscuring. Apr 04 09:17:52 uh, what? Apr 04 09:18:02 ah Apr 04 09:18:18 Maxdamantus: are you playing with xev? Apr 04 09:18:22 so there's no way for a window to know that its contents are completely irrelevant at the moment. Apr 04 09:18:25 bencoh: yes. Apr 04 09:18:58 I would imagine it should probably either unmap or denote obscurity of the window when switching to another one. Apr 04 09:19:19 and then map/unobscure it when the user goes to the window selection UI. Apr 04 09:21:27 * Maxdamantus wonders what other fancy compositing DEs do. Apr 04 09:21:48 * Maxdamantus just uses xmonad on his desktops. Apr 04 09:23:28 alright, so I can either rely on MCE and send a dbus message to query display state before sending every notification, or rely on libosso and register callback to receive device change event (osso_hw_set_event_cb) Apr 04 09:23:56 (and hope that system_inactivity_ind really reflects display status as mentioned in documentation) Apr 04 09:24:15 Yay for use of non-standard APIs where existing protocols already solve problems. Apr 04 09:24:36 Maxdamantus: do you actually know of any standard API to do this? Apr 04 09:24:42 bencoh: X11 Apr 04 09:24:56 bencoh: but as I said, the WM on Maemo doesn't send any useful events. Apr 04 09:25:03 huhu, I wondered about that one, but ... I'd rather not kludge a gtk/hildon codebase Apr 04 09:25:18 (or unmap the window, which results in Xorg creating the event) Apr 04 09:25:53 that libosso stuff is probably just wraps mce dbus interface (for display status) Apr 04 09:28:04 spiiroin: could be. The thing is that the idea of waiting for mce to answer on every chat message doesn't sound too good to me Apr 04 09:28:33 so registering / caching state on every update might be better Apr 04 09:29:08 bencoh: the normal way to do this is: install "display_status_ind" signal listener, do one "get_display_status" query -> you have initial state and are notified about changes Apr 04 09:29:12 this is bothering me, for instance https://bugzilla.redhat.com/show_bug.cgi?id=617310 Apr 04 09:29:28 spiiroin: I see ... thanks :) Apr 04 09:30:23 bencoh: ... and do that query asynchronously while at it ;-) Apr 04 09:30:25 now the question is ... can I store display state somewhere in this pidgin-libnoityf plugin Apr 04 09:30:53 spiiroin: with enough motivation I'd probably rewrite that plugin, but .... meh ;) **** ENDING LOGGING AT Thu Apr 05 03:00:04 2018