summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-07-26 13:40:31 +0000
committerSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-07-26 13:40:31 +0000
commitbe2f9d6ef7c59535773efb10f59793b2d4de9eb3 (patch)
tree997608ae8fc687229108ce90b5d2118ef20b74dd /plugins
parent650616c0d303a82a16229f5ab11007f3da1d6799 (diff)
downloadpcsxr-be2f9d6ef7c59535773efb10f59793b2d4de9eb3.tar.gz
WM_CLASS.WM_NAME (tschak909).
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@69222 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dfxvideo/draw.c24
-rw-r--r--plugins/peopsxgl/gpu.c27
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