Reply
Thread Tools
Posts: 66 | Thanked: 26 times | Joined on Apr 2010
#1
Hello , i am doing a little widget base in the code of sleeper ( for the draw of the gtk widget ) that show the number of desktop that you have ( reading the gconf key /apps/osso/hildon-desktop/views/active ) and when you press the number of it will be jump to that desktop .

the thing is that the jump is not working , i get updated the key in gconf ( /apps/osso/hildon-desktop/views/current) but the action of change the desktop is not apply.

any idea how i get this done ? i think maybe dbus can do the work but when i start dbus-monitor and change the desktop ( with my finger of course ) i get none output of that event so look like dbus is not the guy.

Thanks
my dirty code : http://pastebin.com/2y6TpTdJ
 
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#2
There is no way to command hildon-desktop to change the active desktop. Two options are:

1. Use modified-hildon-desktop (which does listen on changes to the gconf key and switches desktop accordingly), or

2. Try to emulate mouse drags that cause the desktop to change. You can see example of emulating mouse clicks in the source of camkeyd.
__________________
My repository

"N900 community support for the MeeGo-Harmattan" Is the new "Mer is Fremantle for N810".

No more Nokia devices for me.
 
Posts: 66 | Thanked: 26 times | Joined on Apr 2010
#3
Originally Posted by Matan View Post
There is no way to command hildon-desktop to change the active desktop. Two options are:

1. Use modified-hildon-desktop (which does listen on changes to the gconf key and switches desktop accordingly), or

2. Try to emulate mouse drags that cause the desktop to change. You can see example of emulating mouse clicks in the source of camkeyd.
thanks for he reply , but i can't see the part of the code of camkeyd that emulate mouse click , i just can see some key press things.
 
Posts: 411 | Thanked: 195 times | Joined on May 2010 @ Cambridge, UK
#4
once you figure it out, maybe emulating the 'hold both edge and let go of one' method would be better?
 
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#5
Yes, I now see that camkey emulates keyboard, not mouse, but it is almost the same. See the relevant man page, like here:

http://linux.die.net/man/3/xtestfakemotionevent
__________________
My repository

"N900 community support for the MeeGo-Harmattan" Is the new "Mer is Fremantle for N810".

No more Nokia devices for me.
 
Posts: 66 | Thanked: 26 times | Joined on Apr 2010
#6
Originally Posted by Matan View Post
Yes, I now see that camkey emulates keyboard, not mouse, but it is almost the same. See the relevant man page, like here:

http://linux.die.net/man/3/xtestfakemotionevent
thanks again , i will check this
 
Posts: 66 | Thanked: 26 times | Joined on Apr 2010
#7
thanks ppl for the help , this is the result code of the widget i was creating , is not perfect , is dirty but somehow work
Attached Files
File Type: zip deskswitch.zip (1.5 KB, 141 views)
 
Reply


 
Forum Jump


All times are GMT. The time now is 08:51.