From 80c57531413c927b3763ba7ab20c7a19131b0c69 Mon Sep 17 00:00:00 2001 From: Lionel Ulmer Date: Sun, 17 Mar 2002 13:00:11 +0000 Subject: Fixed the 'window title' problem for the SDL and X11 ports. Other 'porters' should fix their front-ends (sorry :-) ). svn-id: r3776 --- x11.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'x11.cpp') diff --git a/x11.cpp b/x11.cpp index ecb60fad4b..af8f5192fd 100644 --- a/x11.cpp +++ b/x11.cpp @@ -208,7 +208,7 @@ void initGraphics(Scumm *s, bool fullScreen, unsigned int scaleFactor) { XTextProperty window_name; char *name = (char *) &buf; - scale = scaleFactor; // not implemented yet! ignored. + scale = scaleFactor; // not implemented yet! ignored. /* For the window title */ sprintf(buf, "ScummVM - %s", gameName = s->getGameName()); @@ -278,6 +278,20 @@ void initGraphics(Scumm *s, bool fullScreen, unsigned int scaleFactor) { local_fb = (unsigned char *) malloc(320 * 200 * sizeof(unsigned char)); } +void setWindowName(Scumm *s) { + char buf[512], *gameName; + XTextProperty window_name; + char *name = (char *) &buf; + + /* For the window title */ + sprintf(buf, "ScummVM - %s", gameName = s->getGameName()); + free(gameName); + + XStringListToTextProperty( &name, 1, &window_name ); + XSetWMProperties(display, window, &window_name, &window_name, + NULL /* argv */, 0 /* argc */, NULL /* size hints */, NULL /* WM hints */, NULL /* class hints */ ); +} + void setShakePos(Scumm *s, int shake_pos) { warning("Unimplemented shaking !"); } -- cgit v1.2.3