Commit Graph

1456 Commits

Author SHA1 Message Date
Yuxuan Shui 6c96e1f3c6
backend: add missing header x.h
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-11-10 02:30:56 +00:00
Yuxuan Shui 2c1fdefe3b
backend: enable xsync fence for nvidia users
This was already done in the legacy backends, this commit adds the same
thing to the new backends.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-11-09 20:01:38 +00:00
yshui c98e7fa39f
Merge pull request #247 from Jauler/dim_bright_windows
Brightness clamping
2019-11-09 17:43:38 +00:00
Rytis Karpuska ec76c5f286 parameterize max brightness limit 2019-11-09 17:56:38 +02:00
Rytis Karpuska e510814b7c implement bright window dimming 2019-11-09 17:54:57 +02:00
yshui c4da36839e
Merge pull request #259 from davidschlachter/next
Updated README
2019-11-08 11:23:11 +00:00
Rytis Karpuska 310b66d519 remove dual_texture from gl_compose as it is just unconditionally set to false. 2019-11-06 01:34:41 +02:00
David Schlachter 155ee835bd
Updated README
Rationale:
- "bug to be expected" -> "bugs to be expected". Usually the noun is plural in this expression (since more than one bug is likely to be found in the future).
- "because that seems to be unmaintained" -> "because it seems to be unmaintained". Using a demonstrative pronoun ("that") versus a personal pronoun ("it") suggests that we need to specify which of several Comptons is unmaintained.
- "features" -> "feature" and "stabilizes" -> "stabilize". The new backends are plural, should be conjugated without the trailing "s".
- "used" -> "use". The command used to launch picom has already been run. Changing to "use" indicates the command that habitually launches picom. Also changed "command line" (the interface, e.g. the prompt) to "command".
- "Rational" (adjective: based on reason) -> "Rationale" (noun: the reasons or logic that motivated an action)
- "when people searches" -> "when people search". Usually conjugated as plural [1](https://english.stackexchange.com/q/263046)
- "to solve aforementioned problems" -> "to solve the aforementioned problems". "Aforementioned" is preceded by a definite article when modifying a noun.
- "mentions to" (usually used in suggesting an 'honourable mention'/accolade regarding somebody) -> "mentions of" (instances of)
2019-11-04 20:43:18 +00:00
yshui 8e0d421ba6
Update README.md 2019-10-25 11:06:15 +01:00
Yuxuan Shui a2f816acb1
rename: fix the name of the modulemap file
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-10-24 19:41:35 +01:00
Yuxuan Shui 35db48b68a
core: fix reg_ignore calculation for window with transparent frame
Previously window with transparent frame is mistakenly treated like a
completely transparent window.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-10-24 19:36:19 +01:00
Yuxuan Shui a0712274ff
win: fix transparency detection for windows without a WM frame
Ping #233

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-10-24 19:30:11 +01:00
Yuxuan Shui c920082bff
Update config file path in the man page
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-10-24 19:26:25 +01:00
Yuxuan Shui 634903727a
Update links to git repo
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-10-24 19:24:38 +01:00
yshui 43b21731f8
Merge pull request #254 from yshui/rename
Rename
2019-10-23 20:30:34 +01:00
Yuxuan Shui 902ad5ddf9
rename: documentation changes
Update names in COPYING, LICENSE.spdx. Document information regarding
the rename in README.md

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-10-23 20:24:25 +01:00
Yuxuan Shui ed0e686f37
rename: update config file paths
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-10-23 20:24:25 +01:00
Yuxuan Shui 8ddbebb5d1
rename: replace "compton" in the codebase
leftovers:

1) config file path. Has to implement compatibility functionalities before
  we can change it.

2) links in man pages. Has to migrate the repo first.

3) _COMPTON_SHADOW, it has become a defacto standard, so we have to keep
   supporting it.

4) dbus names, undecided whether we should/could change it.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-10-23 20:24:20 +01:00
Yuxuan Shui ed6a96dae9
options: add --no-vsync command line option
Otherwise there is no way to override the settings in the config file.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-10-23 20:23:21 +01:00
Yuxuan Shui d9aa32b40a
Remove unused shell scripts
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-10-22 20:48:03 +01:00
Yuxuan Shui 2d28ab6032
options: remove --respect-prop-shadow
A quick search on GitHub showing the _COMPTON_SHADOW is actively being
used (most noteably, by polybar). It is not a difficult thing to support,
and it doesn't have that much runtime overhead. So remove the option
that guards this feature, make it enabled by default.

(Side note, I saw lots of people putting this option in their config
files, but this is actually a command line only option.)

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-10-22 20:45:21 +01:00
Yuxuan Shui cdcdda8ed8
Remove compton-convgen.py
We have better blur configuration built into the compositor by now.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-10-22 20:32:43 +01:00
Yuxuan Shui f227e6c8c7
ci: enable more build types
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-10-12 15:17:28 +01:00
Yuxuan Shui 9f136ca2e4
ci: add more build types
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-10-12 15:15:42 +01:00
Yuxuan Shui 583cf35bed
Fix compiler warnings in release builds
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-10-12 15:12:17 +01:00
Yuxuan Shui 065f9ffd4d
test.h: update to yshui/test.h@9e5fc7b
Fix unit tests on *BSD systems

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-10-12 14:56:59 +01:00
yshui 2d1621aee4
Merge pull request #250 from jbeich/no_opengl
Unbreak build without OpenGL
2019-10-12 14:46:51 +01:00
Jan Beich bd5a5fb568 Unbreak -Dopengl=false clean build
In file included from ../src/x.c:17:
../src/backend/gl/glx.h:10:10: fatal error: 'GL/glx.h' file not found
 #include <GL/glx.h>
         ^~~~~~~~~~
2019-10-12 13:29:10 +00:00
Yuxuan Shui 945dc179f5
meson.build: make sure xcb packages are recent enough
Fixes #248

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-10-11 18:11:45 +01:00
Yuxuan Shui 1ca01ec456
Make sure window cannot enter fading when unredirected
Firstly, this breaks the assumption that when we redirect the screen,
all window is either mapped or unmapped, causing a assertion failure.

Secondly, if transition window into fading when the screen is not
redirected, the fading will not progress until the screen is redirected,
probably not the desired result.

Fixes #246

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-10-11 18:01:13 +01:00
Yuxuan Shui 93f0d80572
options: enable use-damage by default
Since user reports indicate it has real performance benefits.

Also add a command line flag for turning use-damage off.

Fixes #242

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-09-29 00:52:07 +01:00
Yuxuan Shui a69ed89114
Treat first frame after redirection differently
Because first frame no window has their pixmap bound, which doesn't
happen in frames after the first. If a window is unmapped in that frame,
the compositor will try to render a window with no pixmap bound if
fading is enabled.

Now we keep track if we are in the first frame, and if that's the case
we skip fading in unmap/destroy.

Fixes #239, bug number 2

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-09-29 00:40:09 +01:00
Yuxuan Shui f493447b33
win: clear PIXMAP_STALE in {unmap,destroy}_win_start
Also make sure unmapped/destroyed windows don't have PIXMAP_STALE flag
set.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-09-29 00:09:40 +01:00
Yuxuan Shui 0fc6f9aee2
core: bind shadow immediate in initialize_backend
This simplifies the logic a bit since we know a shadow is always bound
(if needed) when the screen is redirected.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-09-29 00:04:09 +01:00
Yuxuan Shui d5e8cf655c
core: rename some functions for clarity
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-09-28 23:43:36 +01:00
Yuxuan Shui 9fc388e5bc
tests/issue239_2: add comments
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-09-28 23:29:19 +01:00
Yuxuan Shui df67fb2508
tests: add testcase for #239, bug number 2
If a window is unmapped during the draw_callback re-run when the screen
is just redirected, that window won't get a chance to acquire a pixmap.
If fading is enabled, the compositor will try to render that window and
crash.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-09-28 23:23:24 +01:00
Yuxuan Shui 0c7a19fda6
backend: glx: add support for setting vsync
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-09-25 23:20:48 +01:00
yshui db37f74140
Merge pull request #241 from jenav/next
Fix build error: initializer element is not constant
2019-09-25 14:33:39 +01:00
Jerónimo Navarro 94c8927d7b win_defs.h: fix #240 2019-09-25 09:47:36 -03:00
Yuxuan Shui 33a106e254
win: don't ignore SHADOW_STALE flag on unmapped windows
Previously all image stale flags are ignored when processing an unmapped
window. If a window gains a shadow during its fading out transition, the
shadow flag will be set, but shadow won't actually be generated, causing
a NULL pointer dereference during render.

Fixes #239

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-09-23 21:52:26 +01:00
Yuxuan Shui c85c9ef1cc
win: set session::pending_updates in win_set_shadow
Otherwise shadow won't get generated in next critical section, causing
NULL pointer dereference or assertion failure in next render.

Partially fixes #239

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-09-23 21:52:11 +01:00
Yuxuan Shui 44fd3f93f7
tests: add test case for #239
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-09-23 21:36:09 +01:00
Yuxuan Shui 33aa805048
tests: support specifying config files for tests
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-09-23 21:22:17 +01:00
Yuxuan Shui bfb6cad648
tests: put test cases into their own folder
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-09-23 21:22:17 +01:00
Yuxuan Shui 8628e498c5
win: rename win_get_name to win_update_name
Make explicit the fact that it modifies the win struct.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-09-23 21:22:17 +01:00
Yuxuan Shui 1a1540a5a6
events: don't call win_get_name for logging
win_get_name _updates_ the name of the window by querying the X server,
thus potentially changes the behaviour of the compositor when logging is
turned on (e.g. we could fail to detect window name changes, because the
name was blindly updated in a logging call without handling the name change).

We shouldn't do that.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-09-23 21:21:07 +01:00
Yuxuan Shui 73ea5d2bfb
backend: dummy: add more sanity checks
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-09-23 21:19:28 +01:00
Yuxuan Shui a0bb392d8c
core: process window updates before recheck_focus
recheck_focus rejects focus of unmapped windows, so we have to make sure
pending maps of windows are processed before we call recheck_focus.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-09-21 05:11:28 +01:00
Yuxuan Shui 3e17f11d6d
options: remove deprecation message about --glx-fshader
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-09-21 01:37:31 +01:00