mirror of
https://github.com/FelixKratz/SketchyBar
synced 2024-11-29 23:00:26 +00:00
fix window retain problems (#336)
This commit is contained in:
parent
81ce6363fa
commit
33f815ceea
2 changed files with 6 additions and 9 deletions
|
@ -246,6 +246,7 @@ static void popup_create_window(struct popup* popup) {
|
||||||
g_bar_manager.font_smoothing);
|
g_bar_manager.font_smoothing);
|
||||||
|
|
||||||
window_set_blur_radius(&popup->window, popup->blur_radius);
|
window_set_blur_radius(&popup->window, popup->blur_radius);
|
||||||
|
popup->needs_ordering = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void popup_close_window(struct popup* popup) {
|
static void popup_close_window(struct popup* popup) {
|
||||||
|
|
14
src/window.c
14
src/window.c
|
@ -184,6 +184,7 @@ void window_send_to_space(struct window* window, uint64_t dsid) {
|
||||||
|
|
||||||
void window_close(struct window* window) {
|
void window_close(struct window* window) {
|
||||||
if (!window->id) return;
|
if (!window->id) return;
|
||||||
|
windows_unfreeze();
|
||||||
|
|
||||||
SLSOrderWindow(g_connection, window->id, 0, 0);
|
SLSOrderWindow(g_connection, window->id, 0, 0);
|
||||||
CGContextRelease(window->context);
|
CGContextRelease(window->context);
|
||||||
|
@ -194,19 +195,14 @@ void window_close(struct window* window) {
|
||||||
|
|
||||||
void window_set_level(struct window* window, uint32_t level) {
|
void window_set_level(struct window* window, uint32_t level) {
|
||||||
windows_freeze();
|
windows_freeze();
|
||||||
SLSTransactionSetWindowLevel(g_transaction, window->id, level);
|
SLSSetWindowLevel(g_connection, window->id, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
void window_order(struct window* window, struct window* parent, int mode) {
|
void window_order(struct window* window, struct window* parent, int mode) {
|
||||||
windows_freeze();
|
windows_freeze();
|
||||||
if (parent) {
|
window->parent = parent;
|
||||||
window->parent = parent;
|
if (mode != W_OUT) window->order_mode = mode;
|
||||||
if (mode != W_OUT) window->order_mode = mode;
|
SLSOrderWindow(g_connection, window->id, mode, parent ? parent->id : 0);
|
||||||
SLSTransactionOrderWindow(g_transaction, window->id, mode, parent->id);
|
|
||||||
} else {
|
|
||||||
window->parent = NULL;
|
|
||||||
SLSTransactionOrderWindow(g_transaction, window->id, mode, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void window_assign_mouse_tracking_area(struct window* window, CGRect rect) {
|
void window_assign_mouse_tracking_area(struct window* window, CGRect rect) {
|
||||||
|
|
Loading…
Reference in a new issue