fix iconify and configreq bugs, bump to v1.3.1
This commit is contained in:
parent
2e003caebd
commit
1f72f88bde
3 changed files with 16 additions and 6 deletions
16
event.c
16
event.c
|
@ -132,7 +132,8 @@ void mainloop(int shape_event) {
|
||||||
void configurereq(XConfigureRequestEvent* e) {
|
void configurereq(XConfigureRequestEvent* e) {
|
||||||
XWindowChanges wc;
|
XWindowChanges wc;
|
||||||
Client* c;
|
Client* c;
|
||||||
|
XRRMonitorInfo monitor;
|
||||||
|
int m;
|
||||||
/* we don't set curtime as nothing here uses it */
|
/* we don't set curtime as nothing here uses it */
|
||||||
c = getclient(e->window, 0);
|
c = getclient(e->window, 0);
|
||||||
trace("configurereq", c, e);
|
trace("configurereq", c, e);
|
||||||
|
@ -140,6 +141,9 @@ void configurereq(XConfigureRequestEvent* e) {
|
||||||
e->value_mask &= ~CWSibling;
|
e->value_mask &= ~CWSibling;
|
||||||
|
|
||||||
if (c) {
|
if (c) {
|
||||||
|
m = getmonitorbyclient(c);
|
||||||
|
monitor = monitorinfo[m];
|
||||||
|
|
||||||
if (e->value_mask & CWX)
|
if (e->value_mask & CWX)
|
||||||
c->x = e->x;
|
c->x = e->x;
|
||||||
if (e->value_mask & CWY)
|
if (e->value_mask & CWY)
|
||||||
|
@ -148,8 +152,12 @@ void configurereq(XConfigureRequestEvent* e) {
|
||||||
c->dx = e->width;
|
c->dx = e->width;
|
||||||
if (e->value_mask & CWHeight)
|
if (e->value_mask & CWHeight)
|
||||||
c->dy = e->height;
|
c->dy = e->height;
|
||||||
if (e->value_mask & CWBorderWidth)
|
if (
|
||||||
c->border = e->border_width;
|
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->value_mask & CWStackMode) {
|
||||||
if (e->detail == Above)
|
if (e->detail == Above)
|
||||||
|
@ -164,8 +172,8 @@ void configurereq(XConfigureRequestEvent* e) {
|
||||||
wc.y = c->y - c->border;
|
wc.y = c->y - c->border;
|
||||||
wc.width = c->dx + c->border + c->border;
|
wc.width = c->dx + c->border + c->border;
|
||||||
wc.height = c->dy + c->border + c->border;
|
wc.height = c->dy + c->border + c->border;
|
||||||
wc.border_width = 1;
|
|
||||||
wc.sibling = None;
|
wc.sibling = None;
|
||||||
|
wc.border_width = c->border;
|
||||||
wc.stack_mode = e->detail;
|
wc.stack_mode = e->detail;
|
||||||
XConfigureWindow(dpy, c->parent, e->value_mask, &wc);
|
XConfigureWindow(dpy, c->parent, e->value_mask, &wc);
|
||||||
|
|
||||||
|
|
2
main.c
2
main.c
|
@ -22,7 +22,7 @@
|
||||||
#include "patchlevel.h"
|
#include "patchlevel.h"
|
||||||
|
|
||||||
char* version[] = {
|
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",
|
"Cox,\n(c) 2019-2022 Derek Stevens",
|
||||||
0};
|
0};
|
||||||
|
|
||||||
|
|
4
menu.c
4
menu.c
|
@ -322,12 +322,14 @@ void delete (Client* c, int shift) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void hide(Client* c) {
|
void hide(Client* c) {
|
||||||
|
int monitor;
|
||||||
if (c == 0 || numhidden == MAXHIDDEN)
|
if (c == 0 || numhidden == MAXHIDDEN)
|
||||||
return;
|
return;
|
||||||
if (hidden(c)) {
|
if (hidden(c)) {
|
||||||
fprintf(stderr, "ryudo: already hidden: %s\n", c->label);
|
fprintf(stderr, "ryudo: already hidden: %s\n", c->label);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
monitor = getmonitorbyclient(c);
|
||||||
XUnmapWindow(dpy, c->parent);
|
XUnmapWindow(dpy, c->parent);
|
||||||
XUnmapWindow(dpy, c->window);
|
XUnmapWindow(dpy, c->window);
|
||||||
setstate(c, IconicState);
|
setstate(c, IconicState);
|
||||||
|
@ -347,7 +349,7 @@ void hide(Client* c) {
|
||||||
}
|
}
|
||||||
numhidden++;
|
numhidden++;
|
||||||
b3items[B3FIXED + numhidden] = 0;
|
b3items[B3FIXED + numhidden] = 0;
|
||||||
ensureactive();
|
ensureactiveonmonitor(monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
void unhide(int n, int map) {
|
void unhide(int n, int map) {
|
||||||
|
|
Loading…
Reference in a new issue