diff options
| -rw-r--r-- | plugins/dfxvideo/draw.c | 24 | ||||
| -rw-r--r-- | plugins/peopsxgl/gpu.c | 27 |
2 files changed, 44 insertions, 7 deletions
diff --git a/plugins/dfxvideo/draw.c b/plugins/dfxvideo/draw.c index dce8e945..92150f35 100644 --- a/plugins/dfxvideo/draw.c +++ b/plugins/dfxvideo/draw.c @@ -1002,6 +1002,8 @@ void CreateDisplay(void) XvAdaptorInfo *ai;
XvImageFormatValues *fo;
+ XClassHint* classHint;
+
// Open display
display = XOpenDisplay(NULL);
@@ -1230,9 +1232,25 @@ if (!myvisual) XSetWMHints(display,window,&wm_hints);
XSetWMNormalHints(display,window,&hints);
- if(pCaptionText)
- XStoreName(display,window,pCaptionText);
- else XStoreName(display,window,"P.E.Op.S SoftX PSX Gpu");
+
+ if(!pCaptionText)
+ pCaptionText = "P.E.Op.S SoftX PSX Gpu";
+
+ // set the WM_NAME and WM_CLASS of the window
+
+ // set the titlebar name
+ XStoreName(display, window, pCaptionText);
+
+ // set the name and class hints for the window manager to use
+ classHint = XAllocClassHint();
+ if(classHint)
+ {
+ classHint->res_name = pCaptionText;
+ classHint->res_class = pCaptionText;
+ }
+
+ XSetClassHint(display, window, classHint);
+ XFree(classHint);
XDefineCursor(display,window,cursor);
diff --git a/plugins/peopsxgl/gpu.c b/plugins/peopsxgl/gpu.c index 2527fe39..7955a11c 100644 --- a/plugins/peopsxgl/gpu.c +++ b/plugins/peopsxgl/gpu.c @@ -763,7 +763,10 @@ void sysdep_create_display(void) // create display int myscreen;char gammastr[14];
Screen * screen;XEvent event;
XSizeHints hints;XWMHints wm_hints;
- MotifWmHints mwmhints;Atom mwmatom;Atom delwindow;
+ MotifWmHints mwmhints;
+ Atom mwmatom;
+ Atom delwindow;
+ XClassHint* classHint;
char *glxfx;
glxfx=getenv("MESA_GLX_FX"); // 3dfx mesa fullscreen flag
@@ -944,9 +947,25 @@ void sysdep_create_display(void) // create display XSetWMHints(display,window,&wm_hints);
XSetWMNormalHints(display,window,&hints);
- if(pCaptionText) // caption
- XStoreName(display,window,pCaptionText);
- else XStoreName(display,window,"Pete MesaGL PSX Gpu");
+
+ if(!pCaptionText)
+ pCaptionText = "Pete MesaGL PSX Gpu";
+
+ // set the WM_NAME and WM_CLASS of the window
+
+ // set the titlebar name
+ XStoreName(display, window, pCaptionText);
+
+ // set the name and class hints for the window manager to use
+ classHint = XAllocClassHint();
+ if(classHint)
+ {
+ classHint->res_name = pCaptionText;
+ classHint->res_class = pCaptionText;
+ }
+
+ XSetClassHint(display, window, classHint);
+ XFree(classHint);
XDefineCursor(display,window,cursor); // cursor
|
