i3ipc-rs
i3ipc-rs copied to clipboard
Should Node.id have type usize instead of i64?
At first glance, I would assume that id should be a usize...
/// The internal ID (actually a C pointer value) of this container. Do not make any
/// assumptions about it. You can use it to (re-)identify and address containers when
/// talking to i3.
pub id: i64,
@leshow's implementation does it that way: https://github.com/leshow/tokio-i3ipc/blob/0a8be5fa88982851f9d924ddff7c60b4bfa51fe8/i3ipc-types/src/reply.rs#L40-L43
/// Tree/Node reply
#[derive(Deserialize, Serialize, Clone, Debug)]
pub struct Node {
pub id: usize,
i3 appears to treat it as a uintptr_t
:
https://github.com/i3/i3/blob/f4964faef08d6add93afbd24cc00fef0c3f6c72a/src/ipc.c#L355-L358
void dump_node(yajl_gen gen, struct Con *con, bool inplace_restart) {
y(map_open);
ystr("id");
y(integer, (uintptr_t)con);
https://github.com/i3/i3/blob/6339427f017e1265a022e6537e16a8b4a921e52f/include/yajl_utils.h#L18-L19
/* Shorter names for all those yajl_gen_* functions */
#define y(x, ...) yajl_gen_##x(gen, ##__VA_ARGS__)
...but then yajl treats it as a long long int
/ %lld
?
https://github.com/lloyd/yajl/blob/5e3a7856e643b4d6410ddc3f84bc2f38174f2872/src/yajl_gen.c#L208-L218
yajl_gen_status
yajl_gen_integer(yajl_gen g, long long int number)
{
char i[32];
ENSURE_VALID_STATE; ENSURE_NOT_KEY; INSERT_SEP; INSERT_WHITESPACE;
sprintf(i, "%lld", number);
g->print(g->ctx, i, (unsigned int)strlen(i));
APPENDED_ATOM;
FINAL_NEWLINE;
return yajl_gen_status_ok;
}
I don't know anymore. Anyone care to verify this?
Which input method do you use? I can input hebrew characters in mlterm-3.8.9 with ibus. (I use arch linux)
I tried a couple of input types, mostly the default and kbd:hebrew, but none changed a bit. My keyboard is a Logitech keyboard (has an extra feature of led highlighting under the keys), but other then that I don't see any other problem. Smells like a true bug. And, yes, I restarted my PC :) didn't help...
And since mlterm is the currently only terminal to show Hebrew correctly, I keep using it for my app by selecting text with the mouse... But the problem is indeed odd. If there was a flag to show some logs I could dig in and try to understand better what's wrong...
I installed ubuntu 20.04 and tried kbd:hebrew. But it works fine in my environment.
Please tell me a little more information about the environment you use.
- How do you configure ~/.mlterm/main?
- Which window manager do you use?
- What does 'mlcc encoding' command show on mlterm ?
- Will you send me ~/.mlterm/*.log files after starting mlterm with --logseq --im kbd:hebrew options, opening kbd:hebrew and inputting something?
Hi Arakiken!
Unfortunately for me the issue persists on my machine...
So to answer your questions:
- I installed mlterm as apt package without too many configurations. If you could kindly direct me to a configuration file I will check/send it to you.
- I use the default windows manager of ubuntu - I use Ubuntu as my pc without remote connection.
- mlcc encoding - this one just got stuck until I pressed enter key.
- The logs in my ~/.mlterm/*.log simply show all the english/latin characters I entered to the terminal, but the Hebrew simply shows nothing and does not move the terminal cursor either.
With Regards,
Rubi Mazaki Email: @.***
On Fri, Apr 23, 2021 at 7:45 PM arakiken @.***> wrote:
I installed ubuntu 20.04 and tried kbd:hebrew. But it works fine in my environment.
Please tell me a little more information about the environment you use.
- How do you configure ~/.mlterm/main?
- Which window manager do you use?
- What does 'mlcc encoding' command show on mlterm ?
- Will you send me ~/.mlterm/*.log files after starting mlterm with --logseq --im kbd:hebrew options, opening kbd:hebrew and inputting something?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/arakiken/mlterm/issues/13#issuecomment-825782715, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALMSOPSZF76AQK2B77WP47TTKGP3XANCNFSM42366YDQ .
I don't know why, but I noticed that bash which mlterm spawned ignored 8bit characters unless LANG=en_US.UTF-8.
Does following workarounds fix this problem ?
- Set LANG=en_US.UTF-8
- Add a following setting to ~/.mlterm/main use_login_shell = true
Nope that didn't do...
2 things to notice here:
- Already said it, but I sense it's important - The mouse is behaving strangely whenever I change to hebrew input in mlterm! Once input is switched to hebrew the mouse is selecting everything in the mlterm window as if the left button is pressed down constantly. It gets released once the hebrew is switched back to english. This is a constant behavior...
- My ~/.mlterm/main was empty before entering the use_login_shell = true line.
With Regards,
Rubi Mazaki Email: @.***
On Sun, Apr 25, 2021 at 11:00 AM arakiken @.***> wrote:
I don't know why, but I noticed that bash which mlterm spawned ignored 8bit characters unless LANG=en_US.UTF-8.
Does following workarounds fix this problem ?
- Set LANG=en_US.UTF-8
- Add a following setting to ~/.mlterm/main use_login_shell = true
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/arakiken/mlterm/issues/13#issuecomment-826278139, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALMSOPSDAOVGVF2ZFQBCQITTKPDZXANCNFSM42366YDQ .