macOS: Reduce energy consumption by not rendering occluded windows
This commit is contained in:
parent
dcb2d95f9a
commit
f3974671f6
@ -50,6 +50,8 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
|||||||
|
|
||||||
- macOS: Add a number of common macOS keyboard shortcuts
|
- macOS: Add a number of common macOS keyboard shortcuts
|
||||||
|
|
||||||
|
- macOS: Reduce energy consumption by not rendering occluded windows
|
||||||
|
|
||||||
- Fix scrollback pager history not being cleared when clearing the
|
- Fix scrollback pager history not being cleared when clearing the
|
||||||
main scrollback buffer (:iss:`1387`)
|
main scrollback buffer (:iss:`1387`)
|
||||||
|
|
||||||
|
|||||||
@ -869,9 +869,11 @@ mark_os_window_for_close(OSWindow* w, bool yes) {
|
|||||||
|
|
||||||
bool
|
bool
|
||||||
should_os_window_be_rendered(OSWindow* w) {
|
should_os_window_be_rendered(OSWindow* w) {
|
||||||
if (glfwGetWindowAttrib(w->handle, GLFW_ICONIFIED)) return false;
|
return (
|
||||||
if (!glfwGetWindowAttrib(w->handle, GLFW_VISIBLE)) return false;
|
glfwGetWindowAttrib(w->handle, GLFW_ICONIFIED) ||
|
||||||
return true;
|
!glfwGetWindowAttrib(w->handle, GLFW_VISIBLE) ||
|
||||||
|
glfwGetWindowAttrib(w->handle, GLFW_OCCLUDED)
|
||||||
|
) ? false : true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user