mirror of
https://github.com/lbonn/rofi
synced 2025-02-01 22:03:25 +00:00
[X11Helper] Add exception for bspwm window placing above window.
fixes: #1169
This commit is contained in:
parent
ac179cd2d9
commit
f14c5c2ada
3 changed files with 12 additions and 1 deletions
|
@ -208,6 +208,8 @@ typedef enum
|
|||
WM_DO_NOT_CHANGE_CURRENT_DESKTOP = 1,
|
||||
/** PANGO WORKSPACE NAMES */
|
||||
WM_PANGO_WORKSPACE_NAMES = 2,
|
||||
/** Root window offset (for bspwm) */
|
||||
WM_ROOT_WINDOW_OFFSET = 4,
|
||||
} WindowManagerQuirk;
|
||||
|
||||
/**
|
||||
|
|
|
@ -496,6 +496,7 @@ static void _window_mode_load_data ( Mode *sw, unsigned int cd )
|
|||
current_desktop = 0;
|
||||
}
|
||||
|
||||
g_debug("Get list from: %d", xcb->screen_nbr);
|
||||
c = xcb_ewmh_get_client_list_stacking ( &xcb->ewmh, xcb->screen_nbr );
|
||||
xcb_ewmh_get_windows_reply_t clients = { 0, };
|
||||
if ( xcb_ewmh_get_client_list_stacking_reply ( &xcb->ewmh, c, &clients, NULL ) ) {
|
||||
|
|
10
source/xcb.c
10
source/xcb.c
|
@ -824,6 +824,11 @@ static int monitor_active_from_id_focused ( int mon_id, workarea *mon )
|
|||
mon->w = r->width;
|
||||
mon->h = r->height;
|
||||
retv = TRUE;
|
||||
if ( (current_window_manager&WM_ROOT_WINDOW_OFFSET) == WM_ROOT_WINDOW_OFFSET ){
|
||||
mon->x += r->x;
|
||||
mon->y += r->y;
|
||||
}
|
||||
g_debug("mon pos: %d %d %d-%d", mon->x, mon->y, mon->w, mon->h);
|
||||
}
|
||||
else if ( mon_id == -4 ) {
|
||||
monitor_dimensions ( t->dst_x, t->dst_y, mon );
|
||||
|
@ -1345,10 +1350,13 @@ static void x11_helper_discover_window_manager ( void )
|
|||
xcb_get_property_cookie_t cookie = xcb_ewmh_get_wm_name_unchecked ( &( xcb->ewmh ), wm_win );
|
||||
if ( xcb_ewmh_get_wm_name_reply ( &( xcb->ewmh ), cookie, &wtitle, (void *) 0 ) ) {
|
||||
if ( wtitle.strings_len > 0 ) {
|
||||
g_debug ( "Found window manager: %s", wtitle.strings );
|
||||
g_debug ( "Found window manager: |%s|", wtitle.strings );
|
||||
if ( g_strcmp0 ( wtitle.strings, "i3" ) == 0 ) {
|
||||
current_window_manager = WM_DO_NOT_CHANGE_CURRENT_DESKTOP | WM_PANGO_WORKSPACE_NAMES;
|
||||
}
|
||||
else if ( g_strcmp0 ( wtitle.strings, "bspwm" ) == 0 ) {
|
||||
current_window_manager = WM_ROOT_WINDOW_OFFSET;
|
||||
}
|
||||
}
|
||||
xcb_ewmh_get_utf8_strings_reply_wipe ( &wtitle );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue