Check for reparent. Only add window to list if its the window is a topmost window. Load cuda at runtime with dlopen. Track window damages and only update then. That is better for output file size. Getting the texture of a window when using a compositor is an nvidia specific limitation. When gpu-screen-recorder supports other gpus then this can be ignored. Remove dependency on glfw (and glew?). Quickly changing workspace and back while recording under i3 breaks the screen recorder. i3 probably unmaps windows in other workspaces. Remove hw_get_frame as it creates a new cuda device ptr which we dont use! Nvidia 515.57 supports nvfbc direct capture with mouse capture. Check if driver is equal or newer than this and use mouse capture in such situations (with direct capture) supports nvfbc direct capture with mouse capture. See https://trac.ffmpeg.org/wiki/EncodingForStreamingSites for optimizing streaming.