keybinds without input-only windows #13

Merged
karx merged 13 commits from hungl/xcrab:master into master 2022-08-01 22:56:10 -05:00
Owner

sorry I reverted to a commit from a long time ago
but it works now

sorry I reverted to a commit from a long time ago but it works now
hungl added 3 commits 2022-07-28 13:07:43 -05:00
65048bab95 alright, keybinds the right way
we still need to make use of the config file, but that's easy enough to change
I'm not quite sure how you would get the inner value for the modmask, but if you make a
simple keypress event listener (or use an existing one, I'm sure those exist),
the inner value that you want is in the keybutmask value of the event object
I'll probably deal with that myself, but I'll leave that here for future reference
Owner

Can you put the config and keybind stuff back in? I'll merge it then

Can you put the config and keybind stuff back in? I'll merge it then
Author
Owner

okay

okay
hungl added 1 commit 2022-07-28 14:23:55 -05:00
hungl changed title from keybinds without input-only windows to WIP: keybinds without input-only windows 2022-07-28 14:25:13 -05:00
hungl added 1 commit 2022-07-28 21:38:44 -05:00
hungl added 1 commit 2022-07-29 11:33:07 -05:00
hungl added 1 commit 2022-07-29 11:33:40 -05:00
hungl added 1 commit 2022-07-31 13:47:53 -05:00
hungl added 1 commit 2022-08-01 13:00:33 -05:00
hungl added 1 commit 2022-08-01 19:55:34 -05:00
cfc0334515 the final commit
I still have to add not crashing when there are no windows left (although it seems that only happens sometimes)

I also have to add a few just-in-cases like completely discarding mod2 in the ModMask (a very difficult thing to do), as well as  moving some functions around and commenting, but in most cases, xcrab should work!
hungl added 1 commit 2022-08-01 20:04:53 -05:00
karx requested changes 2022-08-01 21:54:20 -05:00
karx left a comment
Owner

Please see to all of my comments. I won't merge it until then.

Please see to all of my comments. I won't merge it until then.
src/main.rs Outdated
@ -164,4 +219,3 @@
}
}
#[allow(clippy::too_many_lines)] // FIXME: missing help i have no idea how to make this shorter
Owner

Why did you remove this line?

Why did you remove this line?
Author
Owner

no idea
probably happened because of the revert
I'll add it back

no idea probably happened because of the revert I'll add it back
karx marked this conversation as resolved
src/main.rs Outdated
@ -92,3 +92,1 @@
Self::Toml(te) => Display::fmt(te, f)?,
Self::Var(ve) => Display::fmt(ve, f)?,
Self::Custom(fe) => Display::fmt(fe, f)?,
Self::Bread(be) => Display::fmt(&be, f)?,
Owner

Why did you turn these into references?

Why did you turn these into references?
Author
Owner

accident, probably
I'll fix it

accident, probably I'll fix it
karx marked this conversation as resolved
@ -139,3 +141,2 @@
let (send, mut recv) = mpsc::unbounded_channel();
let (result_send, result_recv) = mpsc::unbounded_channel();
let mut mask = ModMask::new(false, false, true, false, false, false, false, false, false);
Owner

Why is the third value true here?

Why is the third value `true` here?
Owner

AFAIK the third param is Control, which definitely shouldn't be set by default, unless I'm misunderstanding what this code does

AFAIK the third param is Control, which definitely *shouldn't* be set by default, unless I'm misunderstanding what this code does
Owner

Nevermind, it seems to work anyway, so this is fine. Please see my other comments though.

Nevermind, it seems to work anyway, so this is fine. Please see my other comments though.
karx marked this conversation as resolved
@ -29,4 +23,3 @@
pub struct XcrabMsgConfig {
pub socket_path: PathBuf,
}
Owner

Why did you remove all the empty lines in this file?

Why did you remove all the empty lines in this file?
Author
Owner

MOST PROBABLY cargo fmt, but I'm not 100% sure

MOST PROBABLY `cargo fmt`, but I'm not 100% sure
Owner

Rustfmt does not just delete every blank line, unless your rustfmt config is super messed up for some reason.

Rustfmt does not just delete every blank line, unless your rustfmt config is super messed up for some reason.
Author
Owner

in that case, I have absolutely no idea why

in that case, I have absolutely no idea why
karx marked this conversation as resolved
src/msg/main.rs Outdated
@ -1,67 +1,47 @@
// Copyright (C) 2022 Infoshock Tech
Owner

Why did you remove all the empty lines in this file?

Why did you remove all the empty lines in this file?
Author
Owner

MOST PROBABLY cargo fmt, but I'm not 100% sure

MOST PROBABLY `cargo fmt`, but I'm not 100% sure
karx marked this conversation as resolved
hungl added 1 commit 2022-08-01 22:38:01 -05:00
karx requested changes 2022-08-01 22:40:57 -05:00
karx left a comment
Owner

More small changes, should be easy enough

More small changes, should be easy enough
src/main.rs Outdated
@ -166,2 +221,3 @@
#[allow(clippy::too_many_lines)] // FIXME: missing help i have no idea how to make this shorter
#[allow(clippy::too_many_lines)]
Owner

Please remove this blank line

Please remove this blank line
karx marked this conversation as resolved
src/main.rs Outdated
@ -297,2 +284,4 @@
Ok(())
}
// I will move this to x11/client.rs eventually
Owner

Can you move this right now before I merge?

Can you move this right now before I merge?
karx marked this conversation as resolved
hungl added 1 commit 2022-08-01 22:48:04 -05:00
hungl changed title from WIP: keybinds without input-only windows to keybinds without input-only windows 2022-08-01 22:48:40 -05:00
karx approved these changes 2022-08-01 22:55:29 -05:00
karx left a comment
Owner

LGTM

LGTM
karx merged commit a3a4b21981 into master 2022-08-01 22:56:10 -05:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: InfoshockTech/xcrab#13
No description provided.