@ -35,6 +35,7 @@ struct sway_transaction_instruction {
struct sway_container_state container_state ;
} ;
uint32_t serial ;
bool server_request ;
bool waiting ;
} ;
@ -165,7 +166,7 @@ static void copy_container_state(struct sway_container *container,
}
static void transaction_add_node ( struct sway_transaction * transaction ,
struct sway_node * node ) {
struct sway_node * node , bool server_request ) {
struct sway_transaction_instruction * instruction = NULL ;
// Check if we have an instruction for this node already, in which case we
@ -188,9 +189,12 @@ static void transaction_add_node(struct sway_transaction *transaction,
}
instruction - > transaction = transaction ;
instruction - > node = node ;
instruction - > server_request = server_request ;
list_add ( transaction - > instructions , instruction ) ;
node - > ntxnrefs + + ;
} else if ( server_request ) {
instruction - > server_request = true ;
}
switch ( node - > type ) {
@ -364,6 +368,9 @@ static bool should_configure(struct sway_node *node,
if ( node - > destroying ) {
return false ;
}
if ( ! instruction - > server_request ) {
return false ;
}
struct sway_container_state * cstate = & node - > sway_container - > current ;
struct sway_container_state * istate = & instruction - > container_state ;
# if HAVE_XWAYLAND
@ -522,7 +529,7 @@ void transaction_notify_view_ready_immediately(struct sway_view *view) {
}
}
void transaction_commit_dirty ( void ) {
static void _transaction_commit_dirty ( bool server_request ) {
if ( ! server . dirty_nodes - > length ) {
return ;
}
@ -536,10 +543,18 @@ void transaction_commit_dirty(void) {
for ( int i = 0 ; i < server . dirty_nodes - > length ; + + i ) {
struct sway_node * node = server . dirty_nodes - > items [ i ] ;
transaction_add_node ( server . pending_transaction , node );
transaction_add_node ( server . pending_transaction , node , server_request );
node - > dirty = false ;
}
server . dirty_nodes - > length = 0 ;
transaction_commit_pending ( ) ;
}
void transaction_commit_dirty ( void ) {
_transaction_commit_dirty ( true ) ;
}
void transaction_commit_dirty_client ( void ) {
_transaction_commit_dirty ( false ) ;
}