Re: How to get a program window into the task/window switcher?
Hi, ext Martin Wegner wrote: > Hello Faheem, > > thank you so much for your detailed "manual" :) > > I got xprop from here: > > deb http://austinche.name/maemo/ bora/ In Diablo xprop is in x-debug-tools package along with a couple of other X tools. In Fremantle it's in (a stripped version of Debian) x11-utils package. - Eero ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: How to get a program window into the task/window switcher?
Faheem Pervez wrote: > P.S: Frantisek, have any plans on updating the Game_development wiki > page with your tip? It'd help those who do not subscribe here. I just did and kept both variants. I don't know what is the lifecycle of those two windows so I'm not sure when it is effective to set the title of both windows and how long it lasts. At least in Maemo where screen resolution/depth does not change it looks like the are both allocated once in the beginning and kept all the time so the title sticks when set like this when switching fullscreen on on off. The 'if (win)' is needed for me in scummvm since I have no precise control of when the title is set and I've seen segfaults in XStoreName when it was called too early at startup. Frantisek ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: How to get a program window into the task/window switcher?
Incidentally, this only happens because libSDL uses Xutf8TextListToTextProperty() in SDL_x11vm.c to set the window title. Commented a few lines to make it use XStringListToTextProperty() and using SDL_WM_SetCaption() worked to set the title without any Xlib tricks. I can't be bothered, personally, to open a bug as I know it will not be fixed for Diablo but (assuming that the Fremantle hildon-desktop doesn't support UTF-8 strings for titles) anyone else is free to open a bug. P.S: Frantisek, have any plans on updating the Game_development wiki page with your tip? It'd help those who do not subscribe here. Best Regards, Faheem On Wed, Apr 29, 2009 at 10:06 PM, Frantisek Dufka wrote: > Faheem Pervez wrote: > > > char *name = "Title to show on first line - Title to show on second > > line" and then pass that char to XStoreName as the third argument: > > Indeed. Thanks for figuring this out. One definitely needs the " - " > part including spaces there. BTW as for the Mikkov's wiki code sample > I've ended with seting both windows at once no mater if fullscreen or > not. This saves me updating title of the other window after each > fullscreen switch. > > win = info.info.x11.fswindow; > if (win) XStoreName(dpy, win, title); > win = info.info.x11.wmwindow; > if (win) XStoreName(dpy, win, title); > > Seems to work for me. > > Frantisek > ___ > maemo-developers mailing list > maemo-developers@maemo.org > https://lists.maemo.org/mailman/listinfo/maemo-developers > ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: How to get a program window into the task/window switcher?
Brilliant, thanks for that, I've sometimes forgot to do it when the a game in question lets you set the video mode from the menu. That tip should help. Best Regards, Faheem On Wed, Apr 29, 2009 at 10:06 PM, Frantisek Dufka wrote: > BTW as for the Mikkov's wiki code sample > I've ended with seting both windows at once no mater if fullscreen or > not. This saves me updating title of the other window after each > fullscreen switch. > > win = info.info.x11.fswindow; > if (win) XStoreName(dpy, win, title); > win = info.info.x11.wmwindow; > if (win) XStoreName(dpy, win, title); > > Seems to work for me. > > Frantisek > ___ > maemo-developers mailing list > maemo-developers@maemo.org > https://lists.maemo.org/mailman/listinfo/maemo-developers > ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: How to get a program window into the task/window switcher?
Faheem Pervez wrote: > char *name = "Title to show on first line - Title to show on second > line" and then pass that char to XStoreName as the third argument: Indeed. Thanks for figuring this out. One definitely needs the " - " part including spaces there. BTW as for the Mikkov's wiki code sample I've ended with seting both windows at once no mater if fullscreen or not. This saves me updating title of the other window after each fullscreen switch. win = info.info.x11.fswindow; if (win) XStoreName(dpy, win, title); win = info.info.x11.wmwindow; if (win) XStoreName(dpy, win, title); Seems to work for me. Frantisek ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: How to get a program window into the task/window switcher?
Well, apps using a HildonWindow don't *strictly* do it either (Hildon sets the name of the binary as the first line which is odd IMHO) . But for GTK: you get the first line by using g_set_application_name() and then gtk_window_set_title() for the second line. But believe it or not, this isn't hard to do at all... char *name = "Title to show on first line - Title to show on second line" and then pass that char to XStoreName as the third argument: http://i44.tinypic.com/348sy2a.png Best Regards, qwerty12 On Wed, Apr 29, 2009 at 1:21 PM, Frantisek Dufka wrote: > Faheem Pervez wrote: > > For C programs, Mikkov made the following code which works a treat for > > SDL stuff: > > http://wiki.maemo.org/Game_development#Set_the_window_title > > > > This is great and works fine to set first line in task switcher window > list but it would be nice to put something to second line too like > hildonized apps do. Any tips for setting second line from SDL/x11 C code? > > Frantisek > ___ > maemo-developers mailing list > maemo-developers@maemo.org > https://lists.maemo.org/mailman/listinfo/maemo-developers > ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: How to get a program window into the task/window switcher?
Faheem Pervez wrote: > For C programs, Mikkov made the following code which works a treat for > SDL stuff: > http://wiki.maemo.org/Game_development#Set_the_window_title > This is great and works fine to set first line in task switcher window list but it would be nice to put something to second line too like hildonized apps do. Any tips for setting second line from SDL/x11 C code? Frantisek ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: How to get a program window into the task/window switcher?
Hello Faheem, thank you so much for your detailed "manual" :) I got xprop from here: deb http://austinche.name/maemo/ bora/ But libxmuu1 is required for the xprop installation, so I got libxmuu1 from here: deb http://repository.maemo.org/ chinook free non-free Now I started xprop via SSH and the StartupWMClass is "sun-awt-X11-XFramePeer" and I wrote this file: [Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Name=SmartHome GUI Exec=/home/user/run.sh StartupWMClass=sun-awt-X11-XFramePeer When I start my application than I have my application in the tast/window switcher :) I ask me why a simple desktop file, which is only a shortcut in my eyes, brings my application into the task/window switcher although I DO NOT start my applicaton by clicking on the shortcut... I start my application by hand in the terminal and it is also in the task/window switcher :D Can you explain this "feature", please :) ? Greatings, Martin Faheem Pervez schrieb: > From: *Faheem Pervez* mailto:tripp...@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 http://martinator.de>@arcor.de > <http://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 > > > 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. > > > 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 <http://martinator.de>@arcor.de <http://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 <http://martinator.de> > > <http://martinator.de>@arcor.de <http://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 Ja
Re: How to get a program window into the task/window switcher?
Not sure, I can't even bring up a task switcher in the Alpha Fremantle SDK! For C programs, Mikkov made the following code which works a treat for SDL stuff: http://wiki.maemo.org/Game_development#Set_the_window_title Dunno how you'd get a python equivalent (I built python-xlib and fixed it up to work in Diablo in hope it could be used to do the same but I could never see a way to do so...) Can't hurt reporting it as you'll get an answer as to whether it's fixed anyway :) Best Regards, Faheem On Mon, Apr 27, 2009 at 4:34 PM, Thomas Wälti wrote: > > 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) > > Ah how I hate that bug - makes pygame apps looking so amateurish. > Checking Bugzilla, I believe no one ever reported that issue. Any comments? > Shall I still report it or is it FiF anyway? > > Kind regards > -Tom > ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: How to get a program window into the task/window switcher?
> 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) Ah how I hate that bug - makes pygame apps looking so amateurish. Checking Bugzilla, I believe no one ever reported that issue. Any comments? Shall I still report it or is it FiF anyway? Kind regards -Tom ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: How to get a program window into the task/window switcher?
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 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@maemo.org > https://lists.maemo.org/mailman/listinfo/maemo-developers > ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers