fix iconify and configreq bugs, bump to v1.3.1

This commit is contained in:
Iris Lightshard 2022-03-01 14:22:12 -07:00
parent 2e003caebd
commit 1f72f88bde
Signed by: Iris Lightshard
GPG key ID: 3B7FBC22144E6398
3 changed files with 16 additions and 6 deletions

16
event.c
View file

@ -132,7 +132,8 @@ void mainloop(int shape_event) {
void configurereq(XConfigureRequestEvent* e) {
XWindowChanges wc;
Client* c;
XRRMonitorInfo monitor;
int m;
/* we don't set curtime as nothing here uses it */
c = getclient(e->window, 0);
trace("configurereq", c, e);
@ -140,6 +141,9 @@ void configurereq(XConfigureRequestEvent* e) {
e->value_mask &= ~CWSibling;
if (c) {
m = getmonitorbyclient(c);
monitor = monitorinfo[m];
if (e->value_mask & CWX)
c->x = e->x;
if (e->value_mask & CWY)
@ -148,8 +152,12 @@ void configurereq(XConfigureRequestEvent* e) {
c->dx = e->width;
if (e->value_mask & CWHeight)
c->dy = e->height;
if (e->value_mask & CWBorderWidth)
c->border = e->border_width;
if (
e->value_mask & CWBorderWidth && e->width >= monitor.width &&
e->height >= monitor.height)
c->border = 0;
else
c->border = BORDER;
if (e->value_mask & CWStackMode) {
if (e->detail == Above)
@ -164,8 +172,8 @@ void configurereq(XConfigureRequestEvent* e) {
wc.y = c->y - c->border;
wc.width = c->dx + c->border + c->border;
wc.height = c->dy + c->border + c->border;
wc.border_width = 1;
wc.sibling = None;
wc.border_width = c->border;
wc.stack_mode = e->detail;
XConfigureWindow(dpy, c->parent, e->value_mask, &wc);

2
main.c
View file

@ -22,7 +22,7 @@
#include "patchlevel.h"
char* version[] = {
"ryudo version 1.3.0\nCopyright (c) 1994-1996 David Hogan,\n(c) 2004 Russ "
"ryudo version 1.3.1\nCopyright (c) 1994-1996 David Hogan,\n(c) 2004 Russ "
"Cox,\n(c) 2019-2022 Derek Stevens",
0};

4
menu.c
View file

@ -322,12 +322,14 @@ void delete (Client* c, int shift) {
}
void hide(Client* c) {
int monitor;
if (c == 0 || numhidden == MAXHIDDEN)
return;
if (hidden(c)) {
fprintf(stderr, "ryudo: already hidden: %s\n", c->label);
return;
}
monitor = getmonitorbyclient(c);
XUnmapWindow(dpy, c->parent);
XUnmapWindow(dpy, c->window);
setstate(c, IconicState);
@ -347,7 +349,7 @@ void hide(Client* c) {
}
numhidden++;
b3items[B3FIXED + numhidden] = 0;
ensureactive();
ensureactiveonmonitor(monitor);
}
void unhide(int n, int map) {