Go Back   maemo.org - Talk > OS / Platform > Development
 
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
  #1  
Old 2010-08-09, 15:35
e0x e0x is offline
 
Join Date: Apr 2010
Posts: 66
Thanks!: 11
Thanked 26 Times in 18 Posts
Default Desktop Switching

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
Reply With Quote
  #2  
Old 2010-08-09, 15:43
Matan Matan is offline
 
Join Date: Jul 2007
Posts: 1,224
Thanks!: 2
Thanked 1,763 Times in 651 Posts
Default Re: Desktop Switching

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.
Reply With Quote
  #3  
Old 2010-08-09, 16:18
e0x e0x is offline
 
Join Date: Apr 2010
Posts: 66
Thanks!: 11
Thanked 26 Times in 18 Posts
Default Re: Desktop Switching

Quote:
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.
Reply With Quote
  #4  
Old 2010-08-09, 16:23
Tedri Mark Tedri Mark is offline
 
Join Date: May 2010
Location: Cambridge, UK
Posts: 411
Thanks!: 139
Thanked 195 Times in 84 Posts
Default Re: Desktop Switching

once you figure it out, maybe emulating the 'hold both edge and let go of one' method would be better?
Reply With Quote
  #5  
Old 2010-08-09, 16:28
Matan Matan is offline
 
Join Date: Jul 2007
Posts: 1,224
Thanks!: 2
Thanked 1,763 Times in 651 Posts
Default Re: Desktop Switching

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.
Reply With Quote
  #6  
Old 2010-08-09, 16:30
e0x e0x is offline
 
Join Date: Apr 2010
Posts: 66
Thanks!: 11
Thanked 26 Times in 18 Posts
Default Re: Desktop Switching

Quote:
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
Reply With Quote
  #7  
Old 2010-08-13, 02:09
e0x e0x is offline
 
Join Date: Apr 2010
Posts: 66
Thanks!: 11
Thanked 26 Times in 18 Posts
Default Re: Desktop Switching

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, 142 views)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 17:30.