summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2024-11-14 11:38:10 +0100
committerPřemysl Eric Janouch <p@janouch.name>2024-11-14 11:41:09 +0100
commit05a41b262980383ad15eee6ae0020f69639217db (patch)
tree9631ee58feac54479facc08068c92ab04cfd524d
parenta62ed5bbac9a9056d01dd5ce4eb78b8b79999414 (diff)
downloadxK-05a41b262980383ad15eee6ae0020f69639217db.tar.gz
xK-05a41b262980383ad15eee6ae0020f69639217db.tar.xz
xK-05a41b262980383ad15eee6ae0020f69639217db.zip
xA/xM/xW: refresh renamed buffers correctly
Rendering takes the current buffer into account, so change its value before using it, not afterwards. The order happened to not matter on at least Windows, because we just queue a message.
-rw-r--r--xA/xA.go2
-rw-r--r--xM/main.swift2
-rw-r--r--xW/xW.cpp4
3 files changed, 4 insertions, 4 deletions
diff --git a/xA/xA.go b/xA/xA.go
index 495dfd5..954eb68 100644
--- a/xA/xA.go
+++ b/xA/xA.go
@@ -921,11 +921,11 @@ func relayProcessMessage(m *RelayEventMessage) {
b.bufferName = data.New
- refreshBufferList()
if data.BufferName == bufferCurrent {
bufferCurrent = data.New
refreshStatus()
}
+ refreshBufferList()
if data.BufferName == bufferLast {
bufferLast = data.New
}
diff --git a/xM/main.swift b/xM/main.swift
index e6f9648..48f26c4 100644
--- a/xM/main.swift
+++ b/xM/main.swift
@@ -842,11 +842,11 @@ relayRPC.onEvent = { message in
b.bufferName = data.new
- refreshBufferList()
if b.bufferName == relayBufferCurrent {
relayBufferCurrent = data.new
refreshStatus()
}
+ refreshBufferList()
if b.bufferName == relayBufferLast {
relayBufferLast = data.new
}
diff --git a/xW/xW.cpp b/xW/xW.cpp
index b05eb37..199adba 100644
--- a/xW/xW.cpp
+++ b/xW/xW.cpp
@@ -1,7 +1,7 @@
/*
* xW.cpp: Win32 frontend for xC
*
- * Copyright (c) 2023, Přemysl Eric Janouch <p@janouch.name>
+ * Copyright (c) 2023 - 2024, Přemysl Eric Janouch <p@janouch.name>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted.
@@ -914,11 +914,11 @@ relay_process_message(const Relay::EventMessage &m)
b->buffer_name = data.new_;
- refresh_buffer_list();
if (data.buffer_name == g.buffer_current) {
g.buffer_current = data.new_;
refresh_status();
}
+ refresh_buffer_list();
if (data.buffer_name == g.buffer_last)
g.buffer_last = data.new_;
break;