fix some regressions from 1.4 (1.5 is based on 1.3); 'proper' mouse passthrough not there yet

This commit is contained in:
Iris Lightshard 2024-09-26 07:50:54 -06:00
parent 16ed0f7f24
commit 7dd76b67ff
Signed by: Iris Lightshard
GPG key ID: 688407174966CAF3
13 changed files with 58 additions and 64 deletions

View file

@ -13,7 +13,6 @@ IndentCaseLabels: true
SpaceBeforeParens: ControlStatements SpaceBeforeParens: ControlStatements
AlignAfterOpenBracket: AlwaysBreak AlignAfterOpenBracket: AlwaysBreak
BinPackArguments: false BinPackArguments: false
BinPackArguments: false
PointerAlignment: Left PointerAlignment: Left
BreakBeforeBraces: Attach BreakBeforeBraces: Attach
SortIncludes: false SortIncludes: false

View file

@ -1,4 +1,4 @@
Ryudo is free software, and is Copyright (c) 2019-20022 Derek Stevens, Ryudo is free software, and is Copyright (c) 2019-2024 Iris Lightshard,
2004 by Russ Cox, and 1994-1996 by David Hogan. Permission is granted 2004 by Russ Cox, and 1994-1996 by David Hogan. Permission is granted
to all sentient beings to use this software, to make copies of it, to all sentient beings to use this software, to make copies of it,
and to distribute those copies, provided that: and to distribute those copies, provided that:

View file

@ -1,6 +1,6 @@
# [[ RYUDO ]] # [[ RYUDO ]]
## the minimalist floatiling window manager that flows ## the minimalist floatiling window manager that flows
-- Derek Stevens <nilix@nilfm.cc> 2019 -- -- Iris Lightshard <nilix@nilfm.cc> 2019 --
[![micro centered](./screenshots/micro_centered.png.thumb.png)](./screenshots/micro_centered.png) [![micro centered](./screenshots/micro_centered.png.thumb.png)](./screenshots/micro_centered.png)
[![floating porn](./screenshots/floating.png.thumb.png)](./screenshots/floating.png) [![floating porn](./screenshots/floating.png.thumb.png)](./screenshots/floating.png)
@ -63,9 +63,6 @@ Running and building require the following:
* `libX11` and development headers * `libX11` and development headers
* `libXT` and development headers * `libXT` and development headers
* `libXrandr` and development headers * `libXrandr` and development headers
If virtual desktop switching notification is enabled, it requires
* `libnotify` and development headers * `libnotify` and development headers
Build with `build.sh` (calls `mk` and does some other magic), and install with `install.sh` (will install to a local folder if run as a normal user, or to your `$PLAN9/bin/` plus session wrapper in `/usr/bin` and `.desktop` file in `/usr/share/xsessions/` if run as root). Build with `build.sh` (calls `mk` and does some other magic), and install with `install.sh` (will install to a local folder if run as a normal user, or to your `$PLAN9/bin/` plus session wrapper in `/usr/bin` and `.desktop` file in `/usr/share/xsessions/` if run as root).
@ -75,7 +72,7 @@ If you have trouble building, you might need to edit the `mkfile` at line 2 to p
### Bugs and Caveats ### Bugs and Caveats
Of the bugs and caveats not already mentioned in `rio`'s README: Of the bugs and caveats not already mentioned in `rio`'s README:
- No per-pixel alpha support beyond `XShape` extension. - Compositing rules in picom are ignored in favor of the ones in config.h.
- Switching back and forth between virtual desktops very quickly can cause some windows to glitch out, lose their parent (border), and become unfocusable. - Switching back and forth between virtual desktops very quickly can cause some windows to glitch out, lose their parent (border), and become unfocusable.
- Some applications that render fullscreen or dedicated OSD windows (Virtualbox, Zoom, etc) will need to be manually maximized to fix their alignment (in the former case) or otherwise misbehave. - Some applications that render fullscreen or dedicated OSD windows (Virtualbox, Zoom, etc) will need to be manually maximized to fix their alignment (in the former case) or otherwise misbehave.
- Probably more! - Probably more!

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019 Derek Stevens, 2005 Rus Cox, 1994-1996 David Hogan * Copyright (c) 2019 Iris Lightshard, 2005 Rus Cox, 1994-1996 David Hogan
* see README for licence details * see README for licence details
*/ */

2
key.c
View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019 Derek Stevens, 2005 Russ Cox, 1994-1996 David Hogan * Copyright (c) 2019 Iris Lightshard, 2005 Russ Cox, 1994-1996 David Hogan
* see README for license details * see README for license details
*/ */

4
main.c
View file

@ -22,8 +22,8 @@
#include "patchlevel.h" #include "patchlevel.h"
char* version[] = { char* version[] = {
"ryudo version 1.3.3\nCopyright (c) 1994-1996 David Hogan,\n(c) 2004 Russ " "ryudo version 1.5.0\nCopyright (c) 1994-1996 David Hogan,\n(c) 2004 Russ "
"Cox,\n(c) 2019-2022 Derek Stevens", "Cox,\n(c) 2019-2024 Iris Lightshard",
0}; 0};
Display* dpy; Display* dpy;

View file

@ -3,7 +3,7 @@
*/ */
/* /*
* Copyright (c) 2019 Derek Stevens, 2005 Russ Cox, 1994-1996 David Hogan * Copyright (c) 2019 Iris Lightshard, 2005 Russ Cox, 1994-1996 David Hogan
* see README for licence details * see README for licence details
*/ */
@ -30,6 +30,7 @@ int manage(Client* c, int mapped) {
XWMHints* hints; XWMHints* hints;
XSetWindowAttributes attrs; XSetWindowAttributes attrs;
XRRMonitorInfo monitor; XRRMonitorInfo monitor;
ScreenInfo* screen;
trace("manage", c, 0); trace("manage", c, 0);
XSelectInput( XSelectInput(
@ -141,9 +142,10 @@ int manage(Client* c, int mapped) {
} }
if (c->is9term && !(fixsize ? drag(c, Button3) : sweep(c, Button3))) { if (c->is9term && !(fixsize ? drag(c, Button3) : sweep(c, Button3))) {
screen = c->screen;
XKillClient(dpy, c->window); XKillClient(dpy, c->window);
rmclient(c); rmclient(c);
if (current && current->screen == c->screen) if (current && current->screen == screen)
cmapfocus(current); cmapfocus(current);
return 0; return 0;
} }
@ -207,12 +209,12 @@ int manage(Client* c, int mapped) {
XUnmapWindow(dpy, c->screen->sweepwin); XUnmapWindow(dpy, c->screen->sweepwin);
#ifdef AUTOSTICK #ifdef AUTOSTICK
if (!isautostick(c)) if (!isautostick(c))
#endif
active(c); active(c);
/*else if(c->trans != None && current && current->window == c->trans)
active(c);*/
else else
setactive(c, 0); setactive(c, 0);
#else
active(c);
#endif
setstate(c, NormalState); setstate(c, NormalState);
} }
if (current && (current != c)) if (current && (current != c))

11
menu.c
View file

@ -134,7 +134,6 @@ void button(XButtonEvent* e) {
} }
switch (e->button) { switch (e->button) {
case Button1: case Button1:
fflush(stdout);
if (c) { if (c) {
if (ffm) if (ffm)
XRaiseWindow(dpy, c->window); XRaiseWindow(dpy, c->window);
@ -144,15 +143,9 @@ void button(XButtonEvent* e) {
} }
return; return;
case Button2: case Button2:
if (c) { if (numvirtuals > 1 && (n = menuhit(e, &b2menu)) > -1) {
XMapRaised(dpy, c->parent);
active(c);
XAllowEvents(dpy, ReplayPointer, curtime);
} else if (
(e->state & (ShiftMask | ControlMask)) == (ShiftMask | ControlMask)) {
menuhit(e, &egg);
} else if (numvirtuals > 1 && (n = menuhit(e, &b2menu)) > -1)
button2(n); button2(n);
}
return; return;
case Button3: case Button3:
break; break;

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "RYUDO" "1" "March 2022" "" "" .TH "RYUDO" "1" "September 2024" "" ""
. .
.SH "NAME" .SH "NAME"
\fBryudo\fR \- The floatiling window manager that flows \fBryudo\fR \- The floatiling window manager that flows
@ -48,11 +48,6 @@ a full \fBplan9port\fR installation
.IP "\(bu" 4 .IP "\(bu" 4
\fBlibXrandr\fR and development headers \fBlibXrandr\fR and development headers
. .
.IP "" 0
.
.P
If virtual desktop switching notification is enabled, it requires
.
.IP "\(bu" 4 .IP "\(bu" 4
\fBlibnotify\fR and development headers \fBlibnotify\fR and development headers
. .
@ -197,7 +192,7 @@ While there is naitive support for per\-window opacity via the \fBOPACITY\fR and
.SH "AUTHORS" .SH "AUTHORS"
. .
.IP "\(bu" 4 .IP "\(bu" 4
Derek Stevens \fInilix@nilfm\.cc\fR Iris Lightshard \fInilix@nilfm\.cc\fR
. .
.IP "\(bu" 4 .IP "\(bu" 4
Russ Cox \fIrsc@swtch\.com\fR Russ Cox \fIrsc@swtch\.com\fR

View file

@ -106,12 +106,6 @@
<li><code>libX11</code> and development headers</li> <li><code>libX11</code> and development headers</li>
<li><code>libXT</code> and development headers</li> <li><code>libXT</code> and development headers</li>
<li><code>libXrandr</code> and development headers</li> <li><code>libXrandr</code> and development headers</li>
</ul>
<p>If virtual desktop switching notification is enabled, it requires</p>
<ul>
<li><code>libnotify</code> and development headers</li> <li><code>libnotify</code> and development headers</li>
</ul> </ul>
@ -191,8 +185,8 @@
<h2 id="AUTHORS">AUTHORS</h2> <h2 id="AUTHORS">AUTHORS</h2>
<ul> <ul>
<li>Derek Stevens <a href="&#109;&#97;&#x69;&#x6c;&#x74;&#x6f;&#58;&#x6e;&#105;&#108;&#x69;&#x78;&#64;&#x6e;&#x69;&#108;&#102;&#109;&#46;&#99;&#99;" data-bare-link="true">&#110;&#105;&#108;&#x69;&#x78;&#x40;&#x6e;&#105;&#x6c;&#102;&#x6d;&#x2e;&#x63;&#99;</a></li> <li>Iris Lightshard <a href="&#x6d;&#x61;&#x69;&#108;&#x74;&#111;&#58;&#110;&#x69;&#108;&#105;&#x78;&#x40;&#x6e;&#x69;&#x6c;&#102;&#x6d;&#46;&#99;&#x63;" data-bare-link="true">&#x6e;&#x69;&#x6c;&#x69;&#x78;&#64;&#x6e;&#x69;&#108;&#x66;&#109;&#x2e;&#99;&#99;</a></li>
<li>Russ Cox <a href="&#x6d;&#97;&#105;&#108;&#116;&#111;&#x3a;&#x72;&#x73;&#99;&#64;&#x73;&#119;&#116;&#x63;&#104;&#x2e;&#x63;&#x6f;&#x6d;" data-bare-link="true">&#114;&#115;&#99;&#64;&#x73;&#119;&#116;&#99;&#x68;&#x2e;&#99;&#111;&#x6d;</a></li> <li>Russ Cox <a href="&#109;&#97;&#x69;&#x6c;&#116;&#x6f;&#x3a;&#x72;&#115;&#99;&#64;&#115;&#x77;&#116;&#99;&#x68;&#x2e;&#x63;&#111;&#x6d;" data-bare-link="true">&#x72;&#x73;&#x63;&#64;&#115;&#x77;&#x74;&#x63;&#x68;&#x2e;&#x63;&#x6f;&#109;</a></li>
<li>David Hogan, RIP</li> <li>David Hogan, RIP</li>
</ul> </ul>
@ -204,7 +198,7 @@
<ol class='man-decor man-foot man foot'> <ol class='man-decor man-foot man foot'>
<li class='tl'></li> <li class='tl'></li>
<li class='tc'>March 2022</li> <li class='tc'>September 2024</li>
<li class='tr'>ryudo(1)</li> <li class='tr'>ryudo(1)</li>
</ol> </ol>

View file

@ -32,9 +32,6 @@ Running and building require the following:
* `libX11` and development headers * `libX11` and development headers
* `libXT` and development headers * `libXT` and development headers
* `libXrandr` and development headers * `libXrandr` and development headers
If virtual desktop switching notification is enabled, it requires
* `libnotify` and development headers * `libnotify` and development headers
## CONFIGURATION ## CONFIGURATION
@ -105,7 +102,7 @@ While there is naitive support for per-window opacity via the `OPACITY` and `TRA
## AUTHORS ## AUTHORS
- Derek Stevens <nilix@nilfm.cc> - Iris Lightshard <nilix@nilfm.cc>
- Russ Cox <rsc@swtch.com> - Russ Cox <rsc@swtch.com>
- David Hogan, RIP - David Hogan, RIP

View file

@ -24,7 +24,8 @@ static char* TorF(bool) int bool;
} }
/* Returns the string equivalent of a property notify state */ /* Returns the string equivalent of a property notify state */
static char* PropertyState(state) int state; static char* PropertyState(state)
int state;
{ {
switch (state) { switch (state) {
case PropertyNewValue: case PropertyNewValue:
@ -39,7 +40,8 @@ static char* PropertyState(state) int state;
} }
/* Returns the string equivalent of a visibility notify state */ /* Returns the string equivalent of a visibility notify state */
static char* VisibilityState(state) int state; static char* VisibilityState(state)
int state;
{ {
switch (state) { switch (state) {
case VisibilityUnobscured: case VisibilityUnobscured:
@ -57,7 +59,8 @@ static char* VisibilityState(state) int state;
} }
/* Returns the string equivalent of a timestamp */ /* Returns the string equivalent of a timestamp */
static char* ServerTime(time) Time time; static char* ServerTime(time)
Time time;
{ {
unsigned long msec; unsigned long msec;
unsigned long sec; unsigned long sec;
@ -95,7 +98,8 @@ typedef struct _MaskType {
} MaskType; } MaskType;
/* Returns the string equivalent of a mask of buttons and/or modifier keys */ /* Returns the string equivalent of a mask of buttons and/or modifier keys */
static char* ButtonAndOrModifierState(state) unsigned int state; static char* ButtonAndOrModifierState(state)
unsigned int state;
{ {
static char buffer[256]; static char buffer[256];
static MaskType masks[] = { static MaskType masks[] = {
@ -132,7 +136,8 @@ static char* ButtonAndOrModifierState(state) unsigned int state;
} }
/* Returns the string equivalent of a mask of configure window values */ /* Returns the string equivalent of a mask of configure window values */
static char* ConfigureValueMask(valuemask) unsigned int valuemask; static char* ConfigureValueMask(valuemask)
unsigned int valuemask;
{ {
static char buffer[256]; static char buffer[256];
static MaskType masks[] = { static MaskType masks[] = {
@ -164,7 +169,8 @@ static char* ConfigureValueMask(valuemask) unsigned int valuemask;
} }
/* Returns the string equivalent of a motion hint */ /* Returns the string equivalent of a motion hint */
static char* IsHint(is_hint) char is_hint; static char* IsHint(is_hint)
char is_hint;
{ {
switch (is_hint) { switch (is_hint) {
case NotifyNormal: case NotifyNormal:
@ -179,7 +185,8 @@ static char* IsHint(is_hint) char is_hint;
} }
/* Returns the string equivalent of an id or the value "None" */ /* Returns the string equivalent of an id or the value "None" */
static char* MaybeNone(value) int value; static char* MaybeNone(value)
int value;
{ {
static char buffer[16]; static char buffer[16];
@ -192,7 +199,8 @@ static char* MaybeNone(value) int value;
} }
/* Returns the string equivalent of a colormap state */ /* Returns the string equivalent of a colormap state */
static char* ColormapState(state) int state; static char* ColormapState(state)
int state;
{ {
switch (state) { switch (state) {
case ColormapInstalled: case ColormapInstalled:
@ -207,7 +215,8 @@ static char* ColormapState(state) int state;
} }
/* Returns the string equivalent of a crossing detail */ /* Returns the string equivalent of a crossing detail */
static char* CrossingDetail(detail) int detail; static char* CrossingDetail(detail)
int detail;
{ {
switch (detail) { switch (detail) {
case NotifyAncestor: case NotifyAncestor:
@ -231,7 +240,8 @@ static char* CrossingDetail(detail) int detail;
} }
/* Returns the string equivalent of a focus change detail */ /* Returns the string equivalent of a focus change detail */
static char* FocusChangeDetail(detail) int detail; static char* FocusChangeDetail(detail)
int detail;
{ {
switch (detail) { switch (detail) {
case NotifyAncestor: case NotifyAncestor:
@ -264,7 +274,8 @@ static char* FocusChangeDetail(detail) int detail;
} }
/* Returns the string equivalent of a configure detail */ /* Returns the string equivalent of a configure detail */
static char* ConfigureDetail(detail) int detail; static char* ConfigureDetail(detail)
int detail;
{ {
switch (detail) { switch (detail) {
case Above: case Above:
@ -288,7 +299,8 @@ static char* ConfigureDetail(detail) int detail;
} }
/* Returns the string equivalent of a grab mode */ /* Returns the string equivalent of a grab mode */
static char* GrabMode(mode) int mode; static char* GrabMode(mode)
int mode;
{ {
switch (mode) { switch (mode) {
case NotifyNormal: case NotifyNormal:
@ -309,7 +321,8 @@ static char* GrabMode(mode) int mode;
} }
/* Returns the string equivalent of a mapping request */ /* Returns the string equivalent of a mapping request */
static char* MappingRequest(request) int request; static char* MappingRequest(request)
int request;
{ {
switch (request) { switch (request) {
case MappingModifier: case MappingModifier:
@ -327,7 +340,8 @@ static char* MappingRequest(request) int request;
} }
/* Returns the string equivalent of a stacking order place */ /* Returns the string equivalent of a stacking order place */
static char* Place(place) int place; static char* Place(place)
int place;
{ {
switch (place) { switch (place) {
case PlaceOnTop: case PlaceOnTop:
@ -342,7 +356,8 @@ static char* Place(place) int place;
} }
/* Returns the string equivalent of a major code */ /* Returns the string equivalent of a major code */
static char* MajorCode(code) int code; static char* MajorCode(code)
int code;
{ {
static char buffer[32]; static char buffer[32];
@ -360,7 +375,8 @@ static char* MajorCode(code) int code;
} }
/* Returns the string equivalent the keycode contained in the key event */ /* Returns the string equivalent the keycode contained in the key event */
static char* Keycode(ev) XKeyEvent* ev; static char* Keycode(ev)
XKeyEvent* ev;
{ {
static char buffer[256]; static char buffer[256];
KeySym keysym_str; KeySym keysym_str;
@ -635,7 +651,8 @@ static void VerbVisibility(XVisibilityEvent* ev) {
/************ Return the string representation for type of an event ***********/ /************ Return the string representation for type of an event ***********/
/******************************************************************************/ /******************************************************************************/
char* GetType(ev) XEvent* ev; char* GetType(ev)
XEvent* ev;
{ {
switch (ev->type) { switch (ev->type) {
case KeyPress: case KeyPress: