Fix loss of connection when switching display resolution on windows

This commit is contained in:
loki
2020-01-16 21:32:53 +01:00
parent 23d62058dc
commit 701e0e97fe
4 changed files with 81 additions and 90 deletions

View File

@@ -164,12 +164,6 @@ struct x11_attr_t : public display_t {
return capture_e::ok;
}
int reinit() override {
refresh();
return 0;
}
std::unique_ptr<img_t> alloc_img() override {
return std::make_unique<x11_img_t>();
}
@@ -247,14 +241,6 @@ struct shm_attr_t : public x11_attr_t {
return std::make_unique<shm_img_t>();
}
int reinit() override {
data.~shm_data_t();
shm_id.~shm_id_t();
xcb.reset(nullptr);
return init();
}
int init() {
shm_xdisplay.reset(XOpenDisplay(nullptr));
xcb.reset(xcb_connect(nullptr, nullptr));