Skip to content

Commit

Permalink
core: move session_get_target_window to common.h
Browse files Browse the repository at this point in the history
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
  • Loading branch information
yshui committed Jun 26, 2023
1 parent f8ee125 commit efa183b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 7 additions & 0 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,13 @@ typedef struct session {
int (*vsync_wait)(session_t *);
} session_t;

static xcb_window_t attr_unused session_get_target_window(session_t *ps) {
if (ps->o.debug_mode) {
return ps->debug_window;
}
return ps->overlay != XCB_NONE ? ps->overlay : ps->root;
}

/// Enumeration for window event hints.
typedef enum { WIN_EVMODE_UNKNOWN, WIN_EVMODE_FRAME, WIN_EVMODE_CLIENT } win_evmode_t;

Expand Down
7 changes: 0 additions & 7 deletions src/picom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1389,13 +1389,6 @@ static bool init_debug_window(session_t *ps) {
return false;
}

xcb_window_t session_get_target_window(session_t *ps) {
if (ps->o.debug_mode) {
return ps->debug_window;
}
return ps->overlay != XCB_NONE ? ps->overlay : ps->root;
}

uint8_t session_redirection_mode(session_t *ps) {
if (ps->o.debug_mode) {
// If the backend is not rendering to the screen, we don't need to
Expand Down

0 comments on commit efa183b

Please sign in to comment.