Bug 10725 - (int-176391) Hildon calls gconf callbacks late when moving widgets to another desktop
(int-176391)
: Hildon calls gconf callbacks late when moving widgets to another desktop
Status: RESOLVED INVALID
Product: Desktop platform
Home
: 5.0:(10.2010.19-1)
: All Maemo
: Unspecified normal (vote)
: ---
Assigned To: unassigned
: home-bugs
:
:
:
:
  Show dependency tree
 
Reported: 2010-06-20 14:09 UTC by Timur Kristóf
Modified: 2010-10-13 23:23 UTC (History)
2 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Timur Kristóf (reporter) 2010-06-20 14:09:31 UTC
SOFTWARE VERSION:
10.2010.19-1

I have a widget that needs to know which desktop it is currently on.

EXACT STEPS LEADING TO PROBLEM: 
1. Create a widget which responds to the _HILDON_APPLET_ON_CURRENT_DESKTOP X11
property
2. Create a gconf monitor that monitors /apps/osso/hildon-desktop/views/current
3. Show the widget on the current desktop
4. Move the widget on the current desktop in edit mode
5. While still in edit mode, drag the widget to another home screen

EXPECTED OUTCOME:
Hildon calls the gconf callback, then sets the X11 window property.

ACTUAL OUTCOME:
Hildon sets the X11 window property, and then calls the gconf callback.

REPRODUCIBILITY:
always

EXTRA SOFTWARE INSTALLED:
Irrelevant to the problem

OTHER COMMENTS:
If I simply switch homescreens (not in edit mode), or I drag the widget to
another homescreen without moving it on the current one, I get the expected
behaviour.
With this quirk, it becomes extremely hacky to know what homescreen the current
widget is on.
1. Determining it when the X property changes don't work in the above case, as
the gconf entry still tells the previous value
2. Determining it when gconf is called back doesn't work, since the X property
isn't updated before the callback in any other cases.
3. With some hacky solution, it is possible, but still, this is quite annoying.

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3)
Gecko/20100401 Firefox/3.6.3
Comment 1 Andre Klapper maemo.org 2010-06-22 15:23:16 UTC
Thanks for reporting this!

Minimal testcase very welcome, if possible.
Comment 2 Andre Klapper maemo.org 2010-06-23 16:00:32 UTC
Internal question:
"why don't you check the gconf key
  /apps/osso/hildon-desktop/applets/<applet-id>/view
instead?"
Comment 3 Timur Kristóf (reporter) 2010-06-23 19:19:23 UTC
(In reply to comment #2)
> Internal question:
> "why don't you check the gconf key
>   /apps/osso/hildon-desktop/applets/<applet-id>/view
> instead?"
> 

This is because Hildon only adds gconf entries for widgets that were created by
one of its loaders.
If I create a widget dynamically from my own application, then no such entry is
created.
Comment 4 Andre Klapper maemo.org 2010-07-08 15:20:23 UTC
"minimal test application is welcome indeed :)  if you look at a Contacts
shortcut you'll notice that it has a "view" setting.  Contacts shortcuts are
not created by hildon-home but by osso-abook-home-applet, a different process."
Comment 5 Andre Klapper maemo.org 2010-08-26 19:25:06 UTC
Closed internally as INVALID: "If you look at a Contacts shortcut you'll notice
that it has a "view" setting.  Contacts shortcuts are not created by
hildon-home but by osso-abook-home-applet, a different process."
Comment 6 Timur Kristóf (reporter) 2010-08-28 00:58:58 UTC
I don't understand the resolution. This bug is in no way related to Contacts
shortcuts.
Comment 7 Timur Kristóf (reporter) 2010-08-28 17:36:44 UTC
Anyways, I cannot "look at" osso-abook-home-applet, because it is closed
source. My homescreen applets don't have such gconf keys created. If the guys
who marked this INVALID could checkout http://vcs.maemo.org/svn/sticky-notes/
and tell me what I'm doing wrong, I would be greatly impressed.
Comment 8 Andre Klapper maemo.org 2010-08-30 15:36:22 UTC
Can you provide a minimal testcase?
Comment 9 Timur Kristóf (reporter) 2010-08-30 15:45:19 UTC
Okay, I will provide one as soon as I can. (This means tomorrow or the day
after tomorrow.)
Comment 10 Timur Kristóf (reporter) 2010-10-11 15:23:23 UTC
Quite unrelated to the bug, I'll tell you guys what I wanted to achieve in the
first place.

The question is, how can I make an application that displays a desktop widget
that:
- lives in its separate process (so it can be shown from inside an application
and it won't crash when hildon-home crashes)
- will show up in the correct position on restart, including the z-order in
relation to other widgets

As I see it, osso-abook-home-applet gets all of these right, and I'd like to
know how it was done. I'm sure the answer might lie somewhere in
libhildondesktop, but unfortunately, that is very much undocumented.
Comment 11 Timur Kristóf (reporter) 2010-10-13 23:23:02 UTC
Thanks to Hämäläinen Kimmo, I was able to solve my original issue, thus I'm
resolving this bug as INVALID.
Here are the details:
http://lists.maemo.org/pipermail/maemo-developers/2010-October/027729.html