Skip to content

Commit

Permalink
Fix a race condition in window resizing
Browse files Browse the repository at this point in the history
This can be used to fix the tiny race condition not solved by
QubesOS/qubes-gui-daemon#134.
  • Loading branch information
DemiMarie committed Dec 11, 2023
1 parent 215db8b commit fd2423f
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion include/qubes-gui-protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
* - gui-daemon sends MSG_WINDOW_DUMP_ACK to acknowledge finishing
* MSG_WINDOW_DUMP processing; this allows agent to know when it
* can safely unmap a window's grants
* 1.8:
* - gui-agent can now ack a MSG_CONFIGURE and send its own MSG_CONFIGURE
* in a single message.
*/


Expand All @@ -67,7 +70,7 @@ typedef unsigned __int32 uint32_t;
/* version of protocol described in this file, used as gui-daemon protocol
* version; specific agent defines own version which them support */
#define QUBES_GUID_PROTOCOL_VERSION_MAJOR 1
#define QUBES_GUID_PROTOCOL_VERSION_MINOR 7
#define QUBES_GUID_PROTOCOL_VERSION_MINOR 8
#define QUBES_GUID_PROTOCOL_VERSION (QUBES_GUID_PROTOCOL_VERSION_MAJOR << 16 | QUBES_GUID_PROTOCOL_VERSION_MINOR)

/* Before this version, MSG_CLIPBOARD_DATA passed the length in the window field */
Expand Down Expand Up @@ -148,6 +151,7 @@ enum {
MSG_WINDOW_DUMP,
MSG_CURSOR,
MSG_WINDOW_DUMP_ACK,
MSG_CONFIGURE_WITH_ACK,
MSG_MAX,
};
/* Agent -> Daemon, Daemon -> Agent */
Expand Down Expand Up @@ -312,4 +316,16 @@ struct msg_window_dump_grant_refs {
uint32_t refs[0];
};

/* Daemon -> Agent */
struct msg_configure_with_ack {
int32_t old_x;
int32_t old_y;
uint32_t old_width;
uint32_t old_height;
int32_t x;
int32_t y;
uint32_t width;
uint32_t height;
};

#endif /* QUBES_GUI_PROTOCOL_H */

0 comments on commit fd2423f

Please sign in to comment.