Commit Graph

1586 Commits

Author SHA1 Message Date
Yuxuan Shui
eaaef440a4 man: make it clear that --daemon can't be set from the config file
Closes #621

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-06-04 19:49:30 +01:00
yshui
27459907ca Merge pull request #591 from scrouthtv/patch-1
Minor fixes to the issue template
2021-06-04 19:13:52 +01:00
Yuxuan Shui
7ba87598c1 backend: gl_common: implement read_pixel
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-04-13 14:58:48 +01:00
Yuxuan Shui
6faafa95bf backend: add new API: read_pixel
Potential use: to read the border color of a window, so we could draw
rounded border when we round the corners of the window.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-04-13 14:53:57 +01:00
yshui
468d8a0879 Merge pull request #614 from yshui/rounded-border
Rounded border
2021-04-12 09:32:28 +01:00
Yuxuan Shui
b2f9f80a28 legacy glx: store tex_scr location for round corner shader
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-04-12 01:54:07 +01:00
bhagwan
d9bfd0192d legacy glx: extend the border into the corners when they are rounded
Authored-By: bhagwan <bhagwan@disroot.org>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-04-12 01:54:00 +01:00
yshui
9cb552ecd9 Merge pull request #598 from enigma9o7/next
Enable Menu Icon
2021-03-28 23:55:21 +01:00
Bodhi
8c26f2df46 Support Menu Icon 2021-03-03 00:01:55 -08:00
scrouthtv
d25a6e4831 Minor fixes to the issue template 2021-02-07 22:42:38 +01:00
yshui
3680d323f5 Merge pull request #579 from lschmelzeisen/next
Add packages needed for building on Fedora to README.
2021-01-24 20:59:20 +00:00
yshui
1d6a014e26 Merge pull request #581 from thiagokokada/fix-meson-flag-in-circleci
circleci: rename "-Dbuild_docs" -> "-Dwith_docs"
2021-01-24 20:58:52 +00:00
Thiago Kenji Okada
acadafb073 circleci: rename "-Dbuild_docs" -> "-Dwith_docs"
This was renamed in commit 3f2a671, but I think it was simply forgotten
in CI.
2021-01-06 00:08:21 -03:00
Lukas Schmelzeisen
3d4f9f925f Add packages needed for building on Fedora to README. 2021-01-04 22:52:43 +01:00
Yuxuan Shui
d974367a04 backend: xrender: remove root_pict from _xrender_data
It's unused in the backend.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-26 07:53:03 +00:00
Yuxuan Shui
f5fb2648fd x: remove more of session_t parameters
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-26 07:51:03 +00:00
Yuxuan Shui
d61fa6eb0c x: restrict the scope of arguments taken by x_get_prop*
They only need a xcb_connection_t, don't need to pass the whole
session_t.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-26 07:39:21 +00:00
Yuxuan Shui
e3d4ce6612 cache: add cache_set for testing
Also add documentation for the cache functions.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-26 07:25:34 +00:00
Yuxuan Shui
1df3360989 diagnostic: warn the user if they are using a software GL renderer
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-23 03:11:25 +00:00
Yuxuan Shui
b66e5fd422 win: sanitize _NET_FRAME_EXTENTS values
Shouldn't crash picom for window manager bugs.

Related: https://github.com/yshui/picom/issues/270#issuecomment-748210643

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-18 23:45:11 +00:00
Bernd Busse
cce531a5ed opengl: fix warning about unused variable 2020-12-17 23:19:53 +01:00
Bernd Busse
a335eed0b5 c2: Fix scope of predefined target in leaf-matching
Keeping pointers to variables with smaller scope is unsafe as the
compiler might choose to optimize them out.
2020-12-17 11:37:19 +01:00
yshui
2e2b1eeeb1 Update README.md 2020-12-17 00:25:57 +00:00
Yuxuan Shui
896c1a7702 render: restrict painting region of glx_round_corners_dst
Mistake during rebase.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-16 23:34:53 +00:00
Yuxuan Shui
06c58d0b8e render: avoid left shifting negative values
It's undefined behavior.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-16 22:55:33 +00:00
yshui
79f1d4e79d Merge pull request #558 from yshui/rounded-corners-legacy-glx2
Rounded corners for legacy glx backend
2020-12-16 21:22:15 +00:00
Yuxuan Shui
0f5f013b96 Rounded corners for legacy glx backend
Authored-by: bhagwan <bhagwan@disroot.org>
Authored-by: Samuel Hand <samuel.d.hand@gmail.com>
2020-12-16 18:10:36 +00:00
Bernd Busse
8802057ff3 Merge pull request #550 from tryone144/property-array-matching
c2: Perform matching against "all" property values with special index `[*]`
2020-12-15 22:52:45 +01:00
Bernd Busse
5989477b9f c2: Support matching against "all" property values with special index [*]
When matching against custom window properties or atoms perform the
matching against all available values using logical OR if the special index
`[*]` is specified. If no index is specified, we fall-back to the first
value.

This should help when an atom has multiple values and you only want to
check against any of these — e.g. hiding windows with state `hidden`:
`--opacity-rule "0:_NET_WM_STATE@[*]:32a *= 'HIDDEN'"` — without having to
explicitly specify each index separately or when the index is not known
in advance.

Updated the manpage with examples for hidden and sticky windows.
2020-12-15 22:32:07 +01:00
yshui
22948417b3 Merge pull request #568 from SebastienWae/nodisplay
Hide picom from application menus
2020-12-15 17:34:59 +00:00
yshui
8d2a06afb4 Update README.md
Fixes #566
2020-12-15 14:55:59 +00:00
Sebastien Waegeneire
84cc31450d set .desktop files to NoDisplay=true 2020-12-14 14:54:33 +01:00
Yuxuan Shui
af99101757 win: update screen after win_on_win_size_change
win_update_screen needs w->widthb/heightb, which is only updated in
win_on_win_size_change

Related: #554

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-05 23:01:16 +00:00
Yuxuan Shui
3c38b36f04 win: move win_update_screen from fill_win into win_process_update_flags
fill_win only sets the pending geometry (aka the shadow geometry) of the
window, we have to wait for it to propagate to the real geometry before
we can update the screen.

Related: #554

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-05 11:11:16 +00:00
Yuxuan Shui
ef9f09b68a core: don't add damage in handle_new_windows
Since commit 95a64acf5a, fill_win doesn't
set the window geometry anymore, so we can't use it in
handle_new_windows.

However, we don't need to add damage in handle_new_windows anyway,
damage will be added later when the MAPPED flag is handled.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-05 11:04:55 +00:00
Yuxuan Shui
80b35806f1 win: add debug logging to win_update_screen
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-05 11:03:55 +00:00
Yuxuan Shui
8be379db4d win: fix fading always skipped by unmap_win_start
Fading skip needs to be based on the original value of w->ever_damaged.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-04 04:22:48 +00:00
Yuxuan Shui
f5ee0e12e1 win: fix window not being rendered when it's mapped and damged while fading out
Consider these 2 cases:

* A window is mapped while fading out
* A window is mapped and damaged while fading out

From the perspective of map_win_start, these 2 cases look the same. The
window will has ever_damage = true in both cases. However, map_win_start
has to distinguish between these 2 cases, because at the end of
map_win_start, window in the first case cannot have ever_damage = true,
while window in the second case should have ever_damage = true.

Currently, map_win_start always clears ever_damage in both cases
(indirectly through win_skip_fading), which causes windows in the second
case to not be rendered when they should be.

This commit move clearing of ever_damage from unmap_win_finish to
unmap_win_start, so when map_win_start sees ever_damage = true, it's
always to second case. And to make sure windows which are fading out are
still rendered, we relax the ever_damage check in paint_preprocess to
also accept windows that are fading out. (see code comment for
explanation why this is fine)

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-04 03:46:49 +00:00
Yuxuan Shui
e66a452a27 win: skip fading out for window which aren't ever damaged
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-04 02:58:02 +00:00
Yuxuan Shui
1985360632 core: add trace log about why a window is/isn't painted
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-04 02:53:43 +00:00
Yuxuan Shui
c50e44a8f4 win: downgrade a debug log to trace log
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-04 01:52:19 +00:00
Yuxuan Shui
84ab55d730 win: fix win_is_real_visible
Forgot to negate the expression.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-04 01:07:44 +00:00
Yuxuan Shui
a7be1dc1ad [general]: add more debug logs
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-04 01:07:14 +00:00
Yuxuan Shui
2f2b0319d5 log: strip newlines for gl string marker
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-04 01:06:20 +00:00
Yuxuan Shui
95a64acf5a event, win: fix damage when window is moved while fading out
When a window is moved during fade-out, configure_win won't add the old
window extent to damage (because it's unmapping), but the new window
extent will be added to damage when the window is rendered. And the
window will be rendered in its new location. Thus the damage for the old
window extent is missing.

We could fix this by adding damage in configure_win for unmapping window
too. But in general we don't want to move a window while it's fading
out. So we shadow the window geometry. The shadow geometry is updated in
configure_win, and the update will only propagate to real geometry in
win_process_update_flags.

This also fix the case where a window is unmapped, moved, then mapped
all in the same render cycle. map_win_start is supposed to add the old
window extent to damage in that case, but the old window extent is
already overwritten when we reach map_win_start. The shadow geometry
fixes that.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-03 23:53:10 +00:00
Yuxuan Shui
e1bed6a84b config_libconfig: drop unnecessary warning
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-12-03 06:09:02 +00:00
yshui
bb54da0039 Merge pull request #544 from niacat/ctype
Cast argument to ctype functions to unsigned char

Fix `-Wchar-subscripts` warnings on NetBSD
2020-11-30 22:42:46 +00:00
Bernd Busse
d96abca075 x: split out function to get property info (type, format, size in bytes) 2020-11-30 16:15:25 +01:00
yshui
c634641c20 Merge pull request #551 from yshui/rounded-corners-legacy-xrender
Rounded corners for legacy xrender backend
2020-11-30 01:08:49 +00:00
Yuxuan Shui
cb41ea9644 sample config: add corner-radius and rounded-corners-exclude
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-11-30 00:35:43 +00:00