mirror of
https://github.com/yshui/picom.git
synced 2025-03-31 17:35:52 -04:00
core: drop xcb-dpms
it's not used anymore.
This commit is contained in:
parent
c3883b8064
commit
474eb01e4b
8 changed files with 7 additions and 45 deletions
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
|
@ -34,7 +34,7 @@ jobs:
|
|||
languages: ${{ matrix.language }}
|
||||
|
||||
# Install dependencies
|
||||
- run: sudo apt update && sudo apt install libdbus-1-dev libegl-dev libev-dev libgl-dev libpcre2-dev libpixman-1-dev libx11-xcb-dev libxcb1-dev libxcb-composite0-dev libxcb-damage0-dev libxcb-dpms0-dev libxcb-glx0-dev libxcb-image0-dev libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-shape0-dev libxcb-util-dev libxcb-xfixes0-dev libxext-dev meson ninja-build uthash-dev
|
||||
- run: sudo apt update && sudo apt install libdbus-1-dev libegl-dev libev-dev libgl-dev libpcre2-dev libpixman-1-dev libx11-xcb-dev libxcb1-dev libxcb-composite0-dev libxcb-damage0-dev libxcb-glx0-dev libxcb-image0-dev libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-shape0-dev libxcb-util-dev libxcb-xfixes0-dev libxext-dev meson ninja-build uthash-dev
|
||||
if: ${{ matrix.language == 'cpp' }}
|
||||
|
||||
# Autobuild
|
||||
|
|
|
@ -41,18 +41,19 @@
|
|||
* Remove command line options `-n`, `-a`, and `-s`. They were removed more than 10 years ago, it's time to finally get rid of them entirely. (#1254)
|
||||
* Remove error message for `--glx-swap-method`, it was deprecated in v6.
|
||||
* Remove error message for passing argument to `--vsync` arguments, it was deprecated in v5.
|
||||
* Option `--opengl` is now deprecated, use `--backend=glx` instead.
|
||||
* Option `--opengl` is now deprecated, use `--backend=glx` instead.
|
||||
|
||||
## Bug fixes
|
||||
|
||||
* Fix ghosting artifacts that sometimes occur when window manager is restarted (#1081)
|
||||
* Fix a bug where rounded corner is disabled after making a window fullscreen and back (#1216)
|
||||
|
||||
## Dependency changes
|
||||
## Build changes
|
||||
|
||||
* picom now uses some OpenGL 4.3 features.
|
||||
* picom now optionally depends on `rtkit` at runtime to give itself realtime scheduling priority.
|
||||
* `libconfig` is now a mandatory dependency, with a minimal supported version of 1.7.
|
||||
* picom doesn't depend on `xcb-dpms` anymore.
|
||||
|
||||
# v11.2 (2024-Feb-13)
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ Assuming you already have all the usual building tools installed (e.g. gcc, pyth
|
|||
* xcb
|
||||
* xcb-util
|
||||
* xcb-damage
|
||||
* xcb-dpms
|
||||
* xcb-xfixes
|
||||
* xcb-shape
|
||||
* xcb-renderutil
|
||||
|
@ -49,7 +48,7 @@ Assuming you already have all the usual building tools installed (e.g. gcc, pyth
|
|||
On Debian based distributions (e.g. Ubuntu), the needed packages are
|
||||
|
||||
```
|
||||
libconfig-dev libdbus-1-dev libegl-dev libev-dev libgl-dev libepoxy-dev libpcre2-dev libpixman-1-dev libx11-xcb-dev libxcb1-dev libxcb-composite0-dev libxcb-damage0-dev libxcb-dpms0-dev libxcb-glx0-dev libxcb-image0-dev libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-shape0-dev libxcb-util-dev libxcb-xfixes0-dev libxext-dev meson ninja-build uthash-dev
|
||||
libconfig-dev libdbus-1-dev libegl-dev libev-dev libgl-dev libepoxy-dev libpcre2-dev libpixman-1-dev libx11-xcb-dev libxcb1-dev libxcb-composite0-dev libxcb-damage0-dev libxcb-glx0-dev libxcb-image0-dev libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-shape0-dev libxcb-util-dev libxcb-xfixes0-dev libxext-dev meson ninja-build uthash-dev
|
||||
```
|
||||
|
||||
On Fedora, the needed packages are
|
||||
|
|
|
@ -217,8 +217,6 @@ typedef struct session {
|
|||
xcb_sync_fence_t sync_fence;
|
||||
/// Whether we are rendering the first frame after screen is redirected
|
||||
bool first_frame;
|
||||
/// Whether screen has been turned off
|
||||
bool screen_is_off;
|
||||
/// When last MSC event happened, in useconds.
|
||||
uint64_t last_msc_instant;
|
||||
/// The last MSC number
|
||||
|
@ -332,8 +330,6 @@ typedef struct session {
|
|||
int composite_error;
|
||||
/// Major opcode for X Composite extension.
|
||||
int composite_opcode;
|
||||
/// Whether X DPMS extension exists
|
||||
bool dpms_exists;
|
||||
/// Whether X Shape extension exists.
|
||||
bool shape_exists;
|
||||
/// Event base number for X Shape extension.
|
||||
|
|
|
@ -17,8 +17,8 @@ picom_inc = include_directories(['.', '../include'])
|
|||
cflags = []
|
||||
|
||||
required_xcb_packages = [
|
||||
'xcb', 'xcb-composite', 'xcb-damage', 'xcb-dpms', 'xcb-glx', 'xcb-present',
|
||||
'xcb-randr', 'xcb-render', 'xcb-shape', 'xcb-sync', 'xcb-xfixes'
|
||||
'xcb', 'xcb-composite', 'xcb-damage', 'xcb-glx', 'xcb-present', 'xcb-randr',
|
||||
'xcb-render', 'xcb-shape', 'xcb-sync', 'xcb-xfixes'
|
||||
]
|
||||
|
||||
# Some XCB packages are here because their versioning differs (see check below).
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include <unistd.h>
|
||||
#include <xcb/composite.h>
|
||||
#include <xcb/damage.h>
|
||||
#include <xcb/dpms.h>
|
||||
#include <xcb/glx.h>
|
||||
#include <xcb/present.h>
|
||||
#include <xcb/randr.h>
|
||||
|
@ -2109,7 +2108,6 @@ static session_t *session_init(int argc, char **argv, Display *dpy,
|
|||
xcb_prefetch_extension_data(ps->c.c, &xcb_present_id);
|
||||
xcb_prefetch_extension_data(ps->c.c, &xcb_sync_id);
|
||||
xcb_prefetch_extension_data(ps->c.c, &xcb_glx_id);
|
||||
xcb_prefetch_extension_data(ps->c.c, &xcb_dpms_id);
|
||||
|
||||
ext_info = xcb_get_extension_data(ps->c.c, &xcb_render_id);
|
||||
if (!ext_info || !ext_info->present) {
|
||||
|
@ -2179,12 +2177,6 @@ static session_t *session_init(int argc, char **argv, Display *dpy,
|
|||
ps->glx_event = ext_info->first_event;
|
||||
}
|
||||
|
||||
ext_info = xcb_get_extension_data(ps->c.c, &xcb_dpms_id);
|
||||
ps->dpms_exists = ext_info && ext_info->present;
|
||||
if (!ps->dpms_exists) {
|
||||
log_warn("No DPMS extension");
|
||||
}
|
||||
|
||||
// Parse configuration file
|
||||
if (!parse_config(&ps->o, config_file)) {
|
||||
return NULL;
|
||||
|
|
21
src/x.c
21
src/x.c
|
@ -9,7 +9,6 @@
|
|||
#include <pixman.h>
|
||||
#include <xcb/composite.h>
|
||||
#include <xcb/damage.h>
|
||||
#include <xcb/dpms.h>
|
||||
#include <xcb/glx.h>
|
||||
#include <xcb/present.h>
|
||||
#include <xcb/randr.h>
|
||||
|
@ -782,26 +781,6 @@ void x_request_vblank_event(struct x_connection *c, xcb_window_t window, uint64_
|
|||
set_cant_fail_cookie(c, cookie);
|
||||
}
|
||||
|
||||
static inline bool dpms_screen_is_off(xcb_dpms_info_reply_t *info) {
|
||||
// state is a bool indicating whether dpms is enabled
|
||||
return info->state && (info->power_level != XCB_DPMS_DPMS_MODE_ON);
|
||||
}
|
||||
|
||||
bool x_check_dpms_status(struct x_connection *c, bool *screen_is_off) {
|
||||
auto r = xcb_dpms_info_reply(c->c, xcb_dpms_info(c->c), NULL);
|
||||
if (!r) {
|
||||
log_error("Failed to query DPMS status.");
|
||||
return false;
|
||||
}
|
||||
auto now_screen_is_off = dpms_screen_is_off(r);
|
||||
if (*screen_is_off != now_screen_is_off) {
|
||||
log_debug("Screen is now %s", now_screen_is_off ? "off" : "on");
|
||||
*screen_is_off = now_screen_is_off;
|
||||
}
|
||||
free(r);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a struct conv to a X picture convolution filter, normalizing the kernel
|
||||
* in the process. Allow the caller to specify the element at the center of the kernel,
|
||||
|
|
5
src/x.h
5
src/x.h
|
@ -407,8 +407,3 @@ uint32_t attr_deprecated xcb_generate_id(xcb_connection_t *c);
|
|||
|
||||
/// Ask X server to send us a notification for the next end of vblank.
|
||||
void x_request_vblank_event(struct x_connection *c, xcb_window_t window, uint64_t msc);
|
||||
|
||||
/// Update screen_is_off to reflect the current DPMS state.
|
||||
///
|
||||
/// Returns true if the DPMS state was successfully queried, false otherwise.
|
||||
bool x_check_dpms_status(struct x_connection *c, bool *screen_is_off);
|
||||
|
|
Loading…
Add table
Reference in a new issue