1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-11-03 04:33:49 -05:00
Commit graph

12 commits

Author SHA1 Message Date
Yuxuan Shui
f38ae36f63
core: unmap overlay window when we first acquire it
It used to be unmap when we receive its MapNotify, but now since we discard
events received before we grab X server, that event it lost. But it
turns out we can just unmap it when it's first created, no need to wait
for the MapNotify.

Partially fix #160

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-04-27 14:15:40 +01:00
Yuxuan Shui
b3d8dfb4cf
event: handle reparent to the same parent
When a window is reparented to the same parent again, we should just
move it to the top of the stack, instead of add it again.

Also a slight refactor restack_win.

Fixes #164

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-04-27 13:38:15 +01:00
Yuxuan Shui
bc51fd2c6f
event: promote several logs to log level debug 2019-04-19 21:15:00 +01:00
Yuxuan Shui
bb0df7c72e
Delay window managing
Create a "critical section" in draw_callback by grabbing the X server.
Delay the managing of newly created windows until we enter the cricial section.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-04-19 20:53:58 +01:00
Yuxuan Shui
c8c55ff831
win: handle destruction of unmanaged window
Previous destructions of unmanaged window are silently ignored, causing
windows with duplicated IDs.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-04-19 02:15:31 +01:00
Yuxuan Shui
90a9b41df8
win: split struct win
Currently compton handles window creation event by immediately query all
the information it needs and create a window struct with that
information. However, this is prone to race conditions.

In the future, we want to react to window creation event by creating a
placeholder in the window stack, and only query window information in a
critical section where the X server is grabbed by us.

This commit split struct win into two struct, one as placeholder, the
other for holding actual window information.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-04-17 23:14:45 +01:00
Yuxuan Shui
a28f5f584b
x: wrap xcb_generate_id to check for errors
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-04-08 05:49:39 +01:00
Yuxuan Shui
fb2303413f
Eliminate implicit conversions
Use explicit conversions everywhere. Adding bounds check assertions when
necessary.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-03-30 09:07:21 +00:00
Yuxuan Shui
e8f2298159
event: lazify screen update
Set root screen change flag in event handler, and update in
draw_callback.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-03-23 14:35:23 +00:00
Yuxuan Shui
e414fee91f
event: use log levels, not ifdefs
And some general clean up.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-03-23 14:35:23 +00:00
Yuxuan Shui
17c96eb9ba
core: general clean up
Also move some remaing event functions to event.c

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-03-23 14:35:22 +00:00
Yuxuan Shui
472185e885
core: split out event code
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-03-23 14:35:22 +00:00