macOS: Reduce energy consumption by not rendering occluded windows
This commit is contained in:
parent
dcb2d95f9a
commit
f3974671f6
2 changed files with 7 additions and 3 deletions
|
|
@ -50,6 +50,8 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
|||
|
||||
- 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
|
||||
main scrollback buffer (:iss:`1387`)
|
||||
|
||||
|
|
|
|||
|
|
@ -869,9 +869,11 @@ mark_os_window_for_close(OSWindow* w, bool yes) {
|
|||
|
||||
bool
|
||||
should_os_window_be_rendered(OSWindow* w) {
|
||||
if (glfwGetWindowAttrib(w->handle, GLFW_ICONIFIED)) return false;
|
||||
if (!glfwGetWindowAttrib(w->handle, GLFW_VISIBLE)) return false;
|
||||
return true;
|
||||
return (
|
||||
glfwGetWindowAttrib(w->handle, GLFW_ICONIFIED) ||
|
||||
!glfwGetWindowAttrib(w->handle, GLFW_VISIBLE) ||
|
||||
glfwGetWindowAttrib(w->handle, GLFW_OCCLUDED)
|
||||
) ? false : true;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
Loading…
Reference in a new issue