push version to 2.14.3

This commit is contained in:
Felix Kratz 2023-03-16 22:35:41 +01:00
parent 2f01d41d4d
commit d8dcf4ef76
3 changed files with 7 additions and 7 deletions

View file

@ -161,7 +161,6 @@ static bool alias_update_image(struct alias* alias, bool forced) {
CGImageRef image_ref = window_capture(&alias->window);
if (!image_ref) {
window_init(&alias->window);
return false;
}

View file

@ -24,8 +24,9 @@
#define MAJOR 2
#define MINOR 14
#define PATCH 2
#define PATCH 3
extern CGError SLSRegisterNotifyProc(void* callback, uint32_t event, void* context);
extern int SLSMainConnectionID(void);
extern int RunApplicationEventLoop(void);
@ -209,11 +210,11 @@ void system_events(uint32_t event, void* data, size_t data_length, void* context
}
}
extern CGError SLSRegisterNotifyProc(void* callback, uint32_t event, void* context);
int main(int argc, char **argv) {
if (argc > 1) parse_arguments(argc, argv);
if (is_root()) error("sketchybar: running as root is not allowed! abort..\n");
if (is_root())
error("sketchybar: running as root is not allowed! abort..\n");
init_misc_settings();
acquire_lockfile();

View file

@ -2,6 +2,7 @@
#include "bar_manager.h"
extern struct bar_manager g_bar_manager;
extern int64_t g_disable_capture;
void window_init(struct window* window) {
window->context = NULL;
@ -241,19 +242,18 @@ void window_disable_shadow(struct window* window) {
CFRelease(shadow_props_cf);
}
extern int64_t g_disable_capture;
CGImageRef window_capture(struct window* window) {
if (g_disable_capture) {
int64_t time = clock_gettime_nsec_np(CLOCK_MONOTONIC_RAW_APPROX);
if (g_disable_capture < 0) {
return NULL;
}
else if (time - g_disable_capture > (int64_t)2e9) {
} else if (time - g_disable_capture > (1ULL << 30)) {
g_disable_capture = 0;
} else {
return NULL;
}
}
CGImageRef image_ref = NULL;
uint64_t wid = window->id;