Skip to content

Commit 80ee78c

Browse files
committed
Workspace/WM: setting _NET_WM_NAME and WM_CLASS for window manager's properties.
1 parent 4b6078f commit 80ee78c

File tree

4 files changed

+27
-7
lines changed

4 files changed

+27
-7
lines changed

Applications/Workspace/WM/defaults.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2446,7 +2446,7 @@ static int setIconTile(WScreen * scr, WDefaultEntry * entry, void *tdata, void *
24462446
scr->icon_tile = img;
24472447

24482448
/* put the icon in the noticeboard hint */
2449-
PropSetIconTileHint(scr, img);
2449+
// PropSetIconTileHint(scr, img);
24502450

24512451
if (!wPreferences.flags.noclip || wPreferences.flags.clip_merged_in_dock) {
24522452
if (scr->clip_tile) {
@@ -2513,14 +2513,14 @@ static int setMiniwindowTile(WScreen *scr, WDefaultEntry *entry, void *tdata, vo
25132513
scr->miniwindow_tile = img;
25142514

25152515
/* put the icon in the noticeboard hint */
2516-
/* PropSetIconTileHint(scr, img); */
2516+
// PropSetIconTileHint(scr, img);
25172517

2518-
/* scr->icon_tile_pixmap = pixmap; */
2518+
// scr->icon_tile_pixmap = pixmap;
25192519

25202520
/* icon back color for shadowing */
2521-
/* if (scr->icon_back_texture)
2522-
wTextureDestroy(scr, (WTexture *) scr->icon_back_texture);
2523-
scr->icon_back_texture = wTextureMakeSolid(scr, &((*texture)->any.color));*/
2521+
// if (scr->icon_back_texture)
2522+
// wTextureDestroy(scr, (WTexture *)scr->icon_back_texture);
2523+
// scr->icon_back_texture = wTextureMakeSolid(scr, &((*texture)->any.color));
25242524

25252525
/* Free the texture as nobody else will use it, nor refer to it. */
25262526
if (!entry->addr)

Applications/Workspace/WM/properties.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,23 @@ void PropSetWMakerProtocols(Window root)
172172
(unsigned char *)protocols, count);
173173
}
174174

175+
void PropSetWMName(WScreen *scr, char *name, char *class)
176+
{
177+
static Atom wm_name_atom = 0;
178+
static Atom wm_class_atom = 0;
179+
180+
if (scr->info_window == None)
181+
return;
182+
183+
wm_name_atom = XInternAtom(dpy, "_NET_WM_NAME", False);
184+
XChangeProperty(dpy, scr->info_window, wm_name_atom, XA_STRING, 8, PropModeReplace,
185+
(unsigned char *)name, strlen(name));
186+
wm_class_atom = XInternAtom(dpy, "WM_CLASS", False);
187+
XChangeProperty(dpy, scr->info_window, wm_class_atom, XA_STRING, 8, PropModeReplace,
188+
(unsigned char *)class, strlen(class));
189+
}
190+
191+
#if 0
175192
void PropSetIconTileHint(WScreen *scr, RImage *image)
176193
{
177194
static Atom imageAtom = 0;
@@ -220,6 +237,7 @@ void PropSetIconTileHint(WScreen *scr, RImage *image)
220237
PropModeReplace, tmp, image->width * image->height * 4 + 4);
221238
wfree(tmp);
222239
}
240+
#endif
223241

224242
Window PropGetClientLeader(Window window)
225243
{

Applications/Workspace/WM/properties.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ int PropGetGNUstepWMAttr(Window window, GNUstepWMAttributes **attr);
3939

4040
void PropSetWMakerProtocols(Window root);
4141
void PropCleanUp(Window root);
42-
void PropSetIconTileHint(WScreen *scr, RImage *image);
42+
void PropSetWMName(WScreen *scr, char *name, char *class);
43+
// void PropSetIconTileHint(WScreen *scr, RImage *image);
4344

4445
Window PropGetClientLeader(Window window);
4546

Applications/Workspace/WM/screen.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ static Bool replace_existing_wm(WScreen *scr)
254254

255255
/* for our window manager info notice board and the selection owner */
256256
scr->info_window = XCreateSimpleWindow(dpy, scr->root_win, 0, 0, 10, 10, 0, 0, 0);
257+
PropSetWMName(scr, "WorkspaceManager", "NextSpace");
257258

258259
#ifdef USE_ICCCM_WMREPLACE
259260
/* Try to acquire the selection */

0 commit comments

Comments
 (0)