Interesting this problem only surface when using GTK applications on
KDE. Maybe on other WMs there are some other events after window
restacking that triggers repaint of the window.
Fixes#28
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This was a dubious "fix" for a Nvidia driver problem. The problem was
never fully understood, and the then developers took a shotgun approach
and implemented xsync fences as a fix. Which somehow fixed the problem.
Again, I don't see any indication that the developers understood why
this "fix" worked.
(for details, see chjj/compton#152 and chjj/compton#181)
The driver problem should have been fixed almost 5 years ago. So this
shouldn't be needed anymore. In addition the way compton uses xsync fences
is apparently wrong according to the xsync spec (fences are attached to
screen, but compton uses them as if they were attached to drawables).
So, I will try removing it and see if anyone will complain. If there are
real concrete reasons why fences are needed, it will be brought back.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This is a potentially useful feature for debugging the xrender backend,
so make it a commandline option rather than an obscure compiler flag.
Also this is only usable with xrender, for glx there are better tools
for debugging.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
--dbe does not seem to have an effect on tearing, as noted in the old
manpage, and confirmed by my own testing.
So remove it, since it complicates the logic of painting.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This way we don't need to update the bounding region after window moves.
Also add some comments about the coordinate systems in compton.
Also change a few function that takes a `bool global` parameter to
always return region in local coordinates.
win_rounded_corners is called by win_updated_bounding_shape, so there is
no need for the former to call the later.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
With libX11, the library calls an I/O error handler if the connection to
the server breaks. The default I/O error handler prints an error message
and calls exit(). This can be seen when running a "pre-xcb" compton
against Xephyr and then closing the Xephyr window:
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":1"
after 241 requests (241 known processed) with 0 events remaining.
The current compton would just continue running. After this commit, it
instead exits with this message:
handle_queued_x_events(): X11 server connection broke (error 1)
Signed-off-by: Uli Schlachter <psychon@znc.in>
Xlib uses unsigned long for XIDs, but xcb always uses uint32_t. Thus,
this needs the format string for uint32_t now.
Signed-off-by: Uli Schlachter <psychon@znc.in>
IANAL, but I think I am allowed to add missing copyright notices for
someone else. And I did my best job using git history to figure out who
wrote which functions. So I hope everything is fine.