mirror of
https://github.com/davatorium/rofi.git
synced 2025-06-02 18:31:59 -04:00
Monitor -2 stands for the focused window
When setting rofi's monitor to -2, rofi is placed over the focused window.
This commit is contained in:
parent
fbb2e34aab
commit
cf731b1504
3 changed files with 22 additions and 4 deletions
|
@ -241,6 +241,20 @@ void monitor_active ( Display *display, workarea *mon )
|
|||
-attr.border_width,
|
||||
-attr.border_width,
|
||||
&x, &y, &junkwin ) == True ) {
|
||||
if ( config.monitor == -2 ) {
|
||||
// place the menu above the window
|
||||
// if some window is focused, place menu above window, else fall
|
||||
// back to selected monitor.
|
||||
mon->x = x;
|
||||
mon->y = y;
|
||||
mon->w = attr.width;
|
||||
mon->h = attr.height;
|
||||
mon->t = attr.border_width;
|
||||
mon->b = attr.border_width;
|
||||
mon->l = attr.border_width;
|
||||
mon->r = attr.border_width;
|
||||
return;
|
||||
}
|
||||
monitor_dimensions ( display, screen, x, y, mon );
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue