Fix excessive KPassivePopup usage
- This fixes a kwin_x11 crash for some X11 drivers
For the code:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
for (size_t i = 0; i < 500000; ++i) {
i++;
--i;
}
return 0;
}
- Add a conditional breakpoint in line 7 (i++), with condition: "not_exist_var > 3"
- Add a conditional breakpoint in line 8 (--i), with condition: "not_exist_var2 > 4"
Start debugging in kdevelop and make sure that the "Breakpoints" Tool View is visible. This will create MANY error popups, which ultimately caused kwin_x11 to crash on my intel-gfx setup. To be fair, I could not reproduce the crash on my Nvidia machine.
The new code will just create 1 error popup and reuses it. In this case, it will ugly flicker, but IMHO this is better than crashing kwin_x11.