mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-08-10 00:52:16 +00:00
Abort when we don't have permission for either input or x11 display
This commit is contained in:
@@ -134,7 +134,15 @@ void blend_cursor(Display *display, std::uint8_t *img_data, int width, int heigh
|
||||
}
|
||||
}
|
||||
struct x11_attr_t : public display_t {
|
||||
x11_attr_t() : xdisplay {XOpenDisplay(nullptr) }, xwindow {DefaultRootWindow(xdisplay.get()) }, xattr {} {
|
||||
x11_attr_t() : xdisplay {XOpenDisplay(nullptr) }, xwindow { }, xattr {} {
|
||||
if(!xdisplay) {
|
||||
BOOST_LOG(fatal) << "Could not open x11 display"sv;
|
||||
log_flush();
|
||||
std::abort();
|
||||
}
|
||||
|
||||
xwindow = DefaultRootWindow(xdisplay.get());
|
||||
|
||||
refresh();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user