[maemo-developers] How to get a program window into the task/window switcher?
From: Faheem Pervez trippin1 at gmail.comDate: Mon Apr 27 18:01:47 EEST 2009
- Previous message: Maemo Official Applications Bug Jar 2009.17
- Next message: How to get a program window into the task/window switcher?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: Faheem Pervez <trippin1 at gmail.com> Date: Mon, Apr 27, 2009 at 4:00 PM Subject: Re: How to get a program window into the task/window switcher? To: Martin Wegner <martinator.de at arcor.de> Hello, Here's a SDL example: Building and running http://olofson.net/download/parallax-2.tar.gz and pressing home only shows me the terminal I started it with: http://i42.tinypic.com/124wyub.png <sdlonly> For SDL (and SDL only) , you have to add a "putenv("SDL_VIDEO_X11_WMCLASS=app");" because SDL under Maemo seems to report the same WMCLASS for every SDL app. So I've added "putenv("SDL_VIDEO_X11_WMCLASS=parallax");" above "SDL_Init(SDL_INIT_VIDEO);" and this forces the WMCLASS of this app to be parallax. Other apps usually have a correct WMClass. </sdlonly> Now, if I start the SDL demo on the N800 and run xprop over SSH and tap on my window, I get the following output: http://pastebin.com/mc90995a I do not know where a packaged version of xprop is available for diablo - I compiled my binary on the tablet. Looking at the highlighted line in the pastebin output, the WMCLASS is parallax (ignore the second "parallax" in quotes - the first pair of quotes is the value needed). Now, the next step is to make a desktop file. I've saved this file as /usr/share/applications/hildon/parallax2.desktop. Here is the one I've quickly made for parallax: http://pastebin.com/m66ba244f Notice that the argument given to StartupWMClass is the same as the WMClass output given from xprop. And, lo and behold, I get my icon shown: http://i39.tinypic.com/avllrn.png (Ignore that the window title is shown as unknown - this is something specific to SDL under Maemo) Some hints regarding the desktop file: - The Name field you will want to name properly as it's the name shown in the application menu and it's also shown when you tap and hold on the application's entry in the application switcher on the left. - If you have no intention of running it from the menu, you can remove the Exec field and add NoDisplay=true to the desktop file. As long as the desktop file is there, the icon will still show regardless of not having an exec field and it will still show even if you choose not to display the desktop file entry in the application manager. Best Regards :), Faheem On Sun, Apr 26, 2009 at 5:10 PM, Martin Wegner <martinator.de at arcor.de>wrote: > Hello, > > thank you for your answer :) > > But I must admit you that I don't understand your recommendation :( Can > you make a little example, please? > > Thank you so much! > > Greatings, Martin > > Faheem Pervez schrieb: > > You can use xprop to get the WMClass of the application and make a > > desktop file and add the WMClass given to the StartupWMClass argument > > in the desktop file. It's done with SDL apps and some Xlib apps to get > > the icon shown. > > > > BR > > > > On Sat, Apr 25, 2009 at 4:35 PM, Martin Wegner <martinator.de > > <http://martinator.de>@arcor.de <http://arcor.de>> wrote: > > > > Hello, > > > > my Java AWT/Swing programs don't appear in the task/window > > switcher when > > I use openjdk-6-cacao-jre from the Jalimo project. I have the same > > problem when I use Sun Java SE for Embedded 6u10 headful version. > > > > Is there a way to put a program window into the task/window switcher? > > > > Thank you for your help! > > > > Greatings, Martin > > _______________________________________________ > > maemo-developers mailing list > > maemo-developers at maemo.org <mailto:maemo-developers at maemo.org> > > https://lists.maemo.org/mailman/listinfo/maemo-developers > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20090427/3b3d021e/attachment.htm
- Previous message: Maemo Official Applications Bug Jar 2009.17
- Next message: How to get a program window into the task/window switcher?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]