@@ -32,6 +32,10 @@ Changelog
|
|||||||
- Fix :opt:`background_opacity` not working with pure white backgrounds
|
- Fix :opt:`background_opacity` not working with pure white backgrounds
|
||||||
(:iss:`1285`)
|
(:iss:`1285`)
|
||||||
|
|
||||||
|
- macOS: Fix "New OS Window" dock action not working when kitty is not focused
|
||||||
|
(:iss:`1312`)
|
||||||
|
|
||||||
|
|
||||||
0.13.2 [2019-01-04]
|
0.13.2 [2019-01-04]
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -771,6 +771,9 @@ static unsigned int cocoa_pending_actions = 0;
|
|||||||
void
|
void
|
||||||
set_cocoa_pending_action(CocoaPendingAction action) {
|
set_cocoa_pending_action(CocoaPendingAction action) {
|
||||||
cocoa_pending_actions |= action;
|
cocoa_pending_actions |= action;
|
||||||
|
// The main loop may be blocking on the event queue, if e.g. unfocused.
|
||||||
|
// Unjam it so the pending action is processed right now.
|
||||||
|
unjam_event_loop();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
23
kitty/glfw.c
23
kitty/glfw.c
@@ -57,6 +57,19 @@ update_os_window_viewport(OSWindow *window, bool notify_boss) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// On Cocoa, glfwWaitEvents() can block indefinitely because of the way Cocoa
|
||||||
|
// works. See https://github.com/glfw/glfw/issues/1251. I have noticed this
|
||||||
|
// happening in particular with window resize events, when waiting with no
|
||||||
|
// timeout. See https://github.com/kovidgoyal/kitty/issues/458
|
||||||
|
// So we use an unlovely hack to workaround that case
|
||||||
|
void
|
||||||
|
unjam_event_loop() {
|
||||||
|
#ifdef __APPLE__
|
||||||
|
if (event_loop_blocking_with_no_timeout)
|
||||||
|
wakeup_main_loop();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// callbacks {{{
|
// callbacks {{{
|
||||||
|
|
||||||
@@ -98,16 +111,6 @@ show_mouse_cursor(GLFWwindow *w) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int min_width = 100, min_height = 100;
|
static int min_width = 100, min_height = 100;
|
||||||
// On Cocoa, glfwWaitEvents() can block indefinitely because of the way Cocoa
|
|
||||||
// works. See https://github.com/glfw/glfw/issues/1251. I have noticed this
|
|
||||||
// happening in particular with window resize events, when waiting with no
|
|
||||||
// timeout. See https://github.com/kovidgoyal/kitty/issues/458
|
|
||||||
// So we use an unlovely hack to workaround that case
|
|
||||||
#ifdef __APPLE__
|
|
||||||
#define unjam_event_loop() { if (event_loop_blocking_with_no_timeout) wakeup_main_loop(); }
|
|
||||||
#else
|
|
||||||
#define unjam_event_loop()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
framebuffer_size_callback(GLFWwindow *w, int width, int height) {
|
framebuffer_size_callback(GLFWwindow *w, int width, int height) {
|
||||||
|
|||||||
@@ -172,6 +172,7 @@ void make_os_window_context_current(OSWindow *w);
|
|||||||
void update_os_window_references();
|
void update_os_window_references();
|
||||||
void mark_os_window_for_close(OSWindow* w, bool yes);
|
void mark_os_window_for_close(OSWindow* w, bool yes);
|
||||||
void update_os_window_viewport(OSWindow *window, bool);
|
void update_os_window_viewport(OSWindow *window, bool);
|
||||||
|
void unjam_event_loop();
|
||||||
bool should_os_window_close(OSWindow* w);
|
bool should_os_window_close(OSWindow* w);
|
||||||
bool should_os_window_be_rendered(OSWindow* w);
|
bool should_os_window_be_rendered(OSWindow* w);
|
||||||
void wakeup_main_loop();
|
void wakeup_main_loop();
|
||||||
|
|||||||
Reference in New Issue
Block a user