Bug 371480 - SDL2 Apps causing desktop effects to disappear, task-manager function weirdly, all desktop widgets to disappear and sometimes kwin to crash
Summary: SDL2 Apps causing desktop effects to disappear, task-manager function weirdly...
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.7.5
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-22 09:26 UTC by Martin Chang
Modified: 2016-10-22 09:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Chang 2016-10-22 09:26:36 UTC
While I'm working on my Ray Tracer I found that causes the entire desktop to lose all the effects,  task-manager function weirdly (missing some opened window), all desktop widgets to disappear and sometimes kwin to crash. Everything will comeback to normal after closing the SDL2 window.
After more testing, I found that its SDL2 causing it. Even running simple SDL2 tutorial codes will resulting in the situation described above.
Note that I seems to only happen with SDL2. Creating and running SDL1 windows does not cause the problem.

My ray tracer: https://bitbucket.org/Seanstone5923/simpleray
SDL2 tutorial code that I found that can reproduce the issue: http://lazyfoo.net/tutorials/SDL/02_getting_an_image_on_the_screen/index.php

Reproducible: Always

Steps to Reproduce:
1. Compile and run any SDL2 program (LazyFoo's tutoral or my Ray Tracer will do the job)
2. Weird things described above starts to happen

Actual Results:  
Weird things described above starts to happen

Expected Results:  
Work properly.

 - Happens on both Intel and Nvidia GPU(proprietary driver, not tested on Mesa), not tested on AMD GPUs.
 - No matter what composting back-end I'm using. It will happen.
 -  Tested with SDL 2.0.4
Comment 1 Martin Flöser 2016-10-22 09:36:49 UTC
This is expected behavior. SDL sets a hint to disable the compositor for better performance and KWin honors this. With Plasma 5.8 we introduced a GUI config option where you can disable this behavior in general.

With Plasma 5.7 you can already create a window specific rule to disallow "Block Compositing". Create a rule for the window and select "Force" "No". That will ensure that the compositing does not get disabled.