1
0
Fork 0
forked from wry/wry

config: add app-id window criteria

This commit is contained in:
Julian Orth 2025-05-01 18:27:42 +02:00
parent 6ef7655dbd
commit da64166e82
13 changed files with 102 additions and 24 deletions

View file

@ -3,7 +3,10 @@ use {
client::{Client, ClientId},
criteria::{
CritDestroyListener, CritMatcherId,
tlm::{TL_CHANGED_DESTROYED, TL_CHANGED_NEW, TL_CHANGED_TITLE, TlMatcherChange},
tlm::{
TL_CHANGED_APP_ID, TL_CHANGED_DESTROYED, TL_CHANGED_NEW, TL_CHANGED_TITLE,
TlMatcherChange,
},
},
ifs::{
ext_foreign_toplevel_handle_v1::ExtForeignToplevelHandleV1,
@ -498,11 +501,16 @@ impl ToplevelData {
}
pub fn set_app_id(&self, app_id: &str) {
*self.app_id.borrow_mut() = app_id.to_string();
let dst = &mut *self.app_id.borrow_mut();
if *dst == app_id {
return;
}
*dst = app_id.to_string();
for handle in self.handles.lock().values() {
handle.send_app_id(app_id);
handle.send_done();
}
self.property_changed(TL_CHANGED_APP_ID)
}
pub fn set_fullscreen(