Index: ja2-0.12.1r6466/sgp/Video.cc
===================================================================
--- ja2-0.12.1r6466.orig/sgp/Video.cc	2009-07-24 16:03:59.000000000 +0100
+++ ja2-0.12.1r6466/sgp/Video.cc	2009-07-24 16:15:20.000000000 +0100
@@ -19,7 +19,9 @@
 #include <fcntl.h>
 #include <stdarg.h>
 #include <unistd.h>
-
+#ifdef WITH_MAEMO
+#include "SetTitle.h"
+#endif
 
 #define BUFFER_READY      0x00
 #define BUFFER_DIRTY      0x02
@@ -128,7 +130,11 @@
 {
 	DebugMsg(TOPIC_VIDEO, DBG_LEVEL_0, "Initializing the video manager");
 
+#ifndef WITH_MAEMO
 	SDL_WM_SetCaption(APPLICATION_NAME, NULL);
+#else
+	set_title(APPLICATION_NAME);
+#endif
 
 	ScreenBuffer = SDL_SetVideoMode(SCREEN_WIDTH, SCREEN_HEIGHT, PIXEL_DEPTH, g_video_flags);
 	if (!ScreenBuffer) throw std::runtime_error("Failed to set up video mode");
Index: ja2-0.12.1r6466/sgp/SetTitle.cc
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ ja2-0.12.1r6466/sgp/SetTitle.cc	2009-07-24 16:16:54.000000000 +0100
@@ -0,0 +1,30 @@
+#ifdef WITH_MAEMO
+#include "SetTitle.h"
+#include <SDL/SDL_syswm.h>
+#include <X11/Xutil.h>
+
+void set_title(char *name)
+{
+	SDL_SysWMinfo info;
+	SDL_VERSION(&info.version);
+	if ( SDL_GetWMInfo(&info) )
+	{
+		Display *dpy = info.info.x11.display;
+		if (dpy)
+		{
+			Window win;
+			win = info.info.x11.fswindow;
+			if (win) XStoreName(dpy, win, name);
+			win = info.info.x11.wmwindow;
+			if (win) XStoreName(dpy, win, name);
+		}
+	}
+}
+
+#else
+#include <SDL_video.h>
+void set_title(char *name)
+{
+	SDL_WM_SetCaption(name, NULL);
+}
+#endif
Index: ja2-0.12.1r6466/sgp/SetTitle.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ ja2-0.12.1r6466/sgp/SetTitle.h	2009-07-24 16:15:20.000000000 +0100
@@ -0,0 +1,6 @@
+#ifndef SETTITLE_H
+#define SETTITLE_H
+
+void set_title(char *name);
+
+#endif
Index: ja2-0.12.1r6466/Makefile
===================================================================
--- ja2-0.12.1r6466.orig/Makefile	2009-07-24 16:15:19.000000000 +0100
+++ ja2-0.12.1r6466/Makefile	2009-07-24 16:15:20.000000000 +0100
@@ -448,6 +448,9 @@
 SRCS += sgp/VObject.cc
 SRCS += sgp/VObject_Blitters.cc
 SRCS += sgp/VSurface.cc
+ifdef WITH_MAEMO
+  SRCS += sgp/SetTitle.cc
+endif
 SRCS += sgp/Video.cc
 
 LNGS :=
