Message ID | 20211026160933.440424-1-zane@zanevaniperen.com |
---|---|
State | Accepted |
Commit | 783935de18f4b4c0e5dab7d328648af034a7e676 |
Headers | show |
Series | [FFmpeg-devel] fftools/ffplay: don't disable x11 compositing | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_ppc | success | Make finished |
andriy/make_fate_ppc | success | Make fate finished |
On Wed, 27 Oct 2021, Zane van Iperen wrote: > Prevents desktop stutters caused by the change (specifically on KDE). > We're not a game, we don't actually need it disabled. > > Signed-off-by: Zane van Iperen <zane@zanevaniperen.com> > --- > fftools/ffplay.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/fftools/ffplay.c b/fftools/ffplay.c > index ccea0e4578..4b2e69e613 100644 > --- a/fftools/ffplay.c > +++ b/fftools/ffplay.c > @@ -3746,6 +3746,10 @@ int main(int argc, char **argv) > flags |= SDL_WINDOW_BORDERLESS; > else > flags |= SDL_WINDOW_RESIZABLE; > + > +#ifdef SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR > + SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0"); > +#endif Shouldn't this be SDL_SetHintWithPriority so the user may override it from an environment variable? Thanks, Marton > window = SDL_CreateWindow(program_name, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, default_width, default_height, flags); > SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); > if (window) { > -- > 2.31.1 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". >
On Fri, 29 Oct 2021, Marton Balint wrote: > > > On Wed, 27 Oct 2021, Zane van Iperen wrote: > >> Prevents desktop stutters caused by the change (specifically on KDE). >> We're not a game, we don't actually need it disabled. >> >> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com> >> --- >> fftools/ffplay.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/fftools/ffplay.c b/fftools/ffplay.c >> index ccea0e4578..4b2e69e613 100644 >> --- a/fftools/ffplay.c >> +++ b/fftools/ffplay.c >> @@ -3746,6 +3746,10 @@ int main(int argc, char **argv) >> flags |= SDL_WINDOW_BORDERLESS; >> else >> flags |= SDL_WINDOW_RESIZABLE; >> + >> +#ifdef SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR >> + SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0"); >> +#endif > > Shouldn't this be SDL_SetHintWithPriority so the user may override it from an > environment variable? Ah, never mind, SDL_SetHint can also be overidden. LGTM then, thanks. Although this whole compositing mess is ugly and ideally we should not need something like this... Regards, Marton
diff --git a/fftools/ffplay.c b/fftools/ffplay.c index ccea0e4578..4b2e69e613 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -3746,6 +3746,10 @@ int main(int argc, char **argv) flags |= SDL_WINDOW_BORDERLESS; else flags |= SDL_WINDOW_RESIZABLE; + +#ifdef SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR + SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0"); +#endif window = SDL_CreateWindow(program_name, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, default_width, default_height, flags); SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); if (window) {
Prevents desktop stutters caused by the change (specifically on KDE). We're not a game, we don't actually need it disabled. Signed-off-by: Zane van Iperen <zane@zanevaniperen.com> --- fftools/ffplay.c | 4 ++++ 1 file changed, 4 insertions(+)