From 26312486cffc52c7c3cf7de97a10e13271d2cd97 Mon Sep 17 00:00:00 2001 From: Jim Date: Tue, 15 Oct 2019 10:09:03 -0700 Subject: [PATCH] Merge pull request #2091 from Programatic/xshm_wrong_windows linux-capture: Fix bug where multiple 0x0 windows would appear --- plugins/linux-capture/xhelpers.c | 1 - plugins/linux-capture/xshm-input.c | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/linux-capture/xhelpers.c b/plugins/linux-capture/xhelpers.c index d73d7da94..a6e88842a 100644 --- a/plugins/linux-capture/xhelpers.c +++ b/plugins/linux-capture/xhelpers.c @@ -108,7 +108,6 @@ int randr_screen_count(xcb_connection_t *xcb) { if (!xcb) return 0; - xcb_screen_t *screen; screen = xcb_setup_roots_iterator(xcb_get_setup(xcb)).data; diff --git a/plugins/linux-capture/xshm-input.c b/plugins/linux-capture/xshm-input.c index c7db74d27..1ff3ebba6 100644 --- a/plugins/linux-capture/xshm-input.c +++ b/plugins/linux-capture/xshm-input.c @@ -324,7 +324,9 @@ static bool xshm_server_changed(obs_properties_t *props, obs_property_t *p, ")", i, w, h, x, y); - obs_property_list_add_int(screens, screen_info.array, i); + if (h > 0 && w > 0) + obs_property_list_add_int(screens, screen_info.array, + i); } /* handle missing screen */