Skip to content

Commit 56c4f55

Browse files
committed
Workspace/WM: apply appropriate wmaker fixes.
1 parent 671daff commit 56c4f55

3 files changed

Lines changed: 17 additions & 3 deletions

File tree

Applications/Workspace/WM/appicon.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ WAppIcon *wAppIconCreateForDock(WScreen *scr, const char *command, const char *w
159159

160160
void create_appicon_for_application(WApplication *wapp, WWindow *wwin)
161161
{
162+
/* Transient windows should never get their own appicon */
163+
if (wwin->transient_for != None && wwin->transient_for != wwin->screen->root_win) {
164+
return;
165+
}
162166
/* Try to create an icon from the dock or clip */
163167
create_appicon_from_dock(wwin, wapp, wapp->main_window);
164168

Applications/Workspace/WM/window.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2153,6 +2153,14 @@ void wWindowConfigure(WWindow *wwin, int req_x, int req_y, int req_width, int re
21532153
wFrameWindowConfigure(wwin->frame, req_x, req_y, req_width, h);
21542154
}
21552155

2156+
/*
2157+
* When the frame is resized/moved, the X server repositions a client
2158+
* with non-NorthWest gravity inside the frame to compensate (visible as
2159+
* a GravityNotify with xev), leaving it at the wrong offset.
2160+
*/
2161+
if (wwin->normal_hints->win_gravity != NorthWestGravity)
2162+
XMoveWindow(dpy, wwin->client_win, 0, wwin->frame->top_width);
2163+
21562164
if (!(req_height > wwin->frame->core->height || req_width > wwin->frame->core->width))
21572165
XResizeWindow(dpy, wwin->client_win, req_width, req_height);
21582166

Applications/Workspace/WM/wmspec.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,11 +683,13 @@ static RImage *_makeRImageFromARGBData(unsigned long *data)
683683
height = data[1];
684684
size = width * height;
685685

686-
if (size == 0)
686+
if (size == 0) {
687687
return NULL;
688-
688+
}
689689
image = RCreateImage(width, height, True);
690-
690+
if (!image) {
691+
return NULL;
692+
}
691693
for (imgdata = image->data, i = 2; i < size + 2; i++, imgdata += 4) {
692694
pixel = data[i];
693695
imgdata[3] = (pixel >> 24) & 0xff; /* A */

0 commit comments

Comments
 (0)