Commit Graph

10 Commits

Author SHA1 Message Date
Maxim Solovyov 986b3c1cb3
core: drop xinerama
there are two x extensions for working with monitors (especially
multiple): xinerama and randr. xinerama is old, feature-poor and in
general isn't used anymore compared to the randr: new, feature-rich and
widely-used. for some reason we were using both of them, so let's drop
xinerama to keep things simple, clean and small. and to be modern.

the drop was done in three steps:
* first step was to replace all the xinerama-based code with the
  randr-based one and to replace or remove all the xinerama mentions;
* second step was to replace the xinerama's terminology with the
  randr's one. xinerama was referring only to the word "screen", while
  randr refers to multiple words and i think the word "monitor" is the
  most suitable for us and, hopefully, clear both to a contributor and
  to an end user;
* third step was to refactor the new randr-based code if needed and to
  address related todo's (mostly about moving related functions
  elsewhere).

all the steps were done well except addressing a leftover todo about
moving the win_update_monitor function to the x.c which wasn't done.

the xinerama-shadow-crop option was renamed to crop-shadow-to-monitor,
but it's previous name is still accepted, has effect and the
deprecation message is printed to preserve backwards-compatibility.
2023-01-29 10:51:12 +03:00
Yuxuan Shui aca3fdcef7
core: expand X error handling
We used to have a list of X errors we should ignore in case they do
occur. This commit expands that functionality to also allow us aborting
on certain errors.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-12-14 14:23:55 +00:00
Yuxuan Shui 23c56ab328
c2: add list iterating functions
Also renames free_wincondlst to c2_list_free and move it to c2.h.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-07-17 17:48:13 +01:00
Yuxuan Shui bcbc410c92
Deprecate the refresh-rate options
It's meaningless without the sw-opti option, which has been deprecated
since v6.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-01-24 18:35:45 +00:00
Yuxuan Shui ff70f6056e
core: remove a bit more of Xlib dependencies
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-10-21 02:06:15 +00:00
Yuxuan Shui 8c1b0657ff
Refresh the TODO comments
Removed the outdated ones, clarified some of them, and assigned them to
me.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-08-30 15:25:58 +01:00
Yuxuan Shui df0be9e990
Move find_client_win to win.c
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-04-06 20:24:16 +01:00
Yuxuan Shui 9332cba8df core: delayed handling of root ConfigureNotify
Previously, root ConfigureNotify is handled immediately, by resetting
the backend, which in turn releases all the window images. This puts all
the windows into a state where they don't have images attached, which
they really should be in when the screen is redirected.

(To expand a little, a window without images should only exist if:
    * It's an unmanaged window.
    * Screen is unredirected.)

Normally, this kind of window could be fine, as the next render phase
will re-acquire images for them. However, if a window in this state is
destroyed with fading enabled, then the render phase won't try to
acquire images for it, causing it to go into the main rendering function
without images attached, and trigger an assertion.

This commit delays the handling of root ConfigureNotify until the render
phase. This way, the images will be immediately re-acquired after they
are released, thus prevent this problem from happening.

Also adds a testcase for this.

Fixes #357

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2020-03-31 05:20:56 +01:00
Yuxuan Shui d757d45d1e
picom: make sure --diagnostics works when another picom is running
Currently picom fails at register_cm(), which is before
print_diagnostics(), so we don't see anything.

This commit makes sure we keep going when there is another compositor
already running. However, in this case we need to be careful to not take
the overlay window, otherwise a poorly implemented compositor (for
example, picom) will stop working.

Also restructured the target window initialization logic and added some
comments explaining the logic.

Fixes #333
2020-03-11 19:15:26 +00: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