mirror of
https://github.com/lbonn/rofi
synced 2024-11-27 14:21:07 +00:00
Add option to position rofi at mouse
This commit is contained in:
parent
989e208d3c
commit
f4f2e3d129
2 changed files with 9 additions and 2 deletions
|
@ -87,7 +87,7 @@ dnl ---------------------------------------------------------------------
|
|||
dnl PKG_CONFIG based dependencies
|
||||
dnl ---------------------------------------------------------------------
|
||||
PKG_CHECK_MODULES([glib], [glib-2.0 >= 2.40])
|
||||
GW_CHECK_XCB([xcb-aux xcb-xkb xkbcommon xkbcommon-x11 xcb-ewmh xcb-xinerama xcb-icccm])
|
||||
GW_CHECK_XCB([xcb-aux xcb-xkb xkbcommon >= 0.5.0 xkbcommon-x11 xcb-ewmh xcb-xinerama xcb-icccm])
|
||||
PKG_CHECK_MODULES([x11], [x11 x11-xcb])
|
||||
PKG_CHECK_MODULES([pango], [pango pangocairo])
|
||||
PKG_CHECK_MODULES([cairo], [cairo cairo-xcb])
|
||||
|
|
|
@ -240,6 +240,13 @@ void monitor_active ( workarea *mon )
|
|||
}
|
||||
fprintf ( stderr, "Failed to find selected monitor.\n" );
|
||||
}
|
||||
if ( config.monitor == -3) {
|
||||
if ( pointer_get ( root, &x, &y ) ) {
|
||||
mon->x = x;
|
||||
mon->y = y;
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Get the current desktop.
|
||||
unsigned int current_desktop = 0;
|
||||
if ( config.monitor != -2 && xcb_ewmh_get_current_desktop_reply ( &xcb->ewmh,
|
||||
|
@ -290,7 +297,7 @@ void monitor_active ( workarea *mon )
|
|||
return;
|
||||
}
|
||||
}
|
||||
if ( pointer_get ( xcb->screen->root, &x, &y ) ) {
|
||||
if ( pointer_get ( root, &x, &y ) ) {
|
||||
monitor_dimensions ( x, y, mon );
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue