diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-06-07 15:07:50 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-06-07 15:07:50 +0000 |
| commit | 5579b28481a54d9df451e40854d86b927a64a2f4 (patch) | |
| tree | 1bd07d2a6affe49e6a9fa892243473c3c149fffc /openbox/screen.c | |
| parent | 2b135c53565547779719348ec3164311be8191fe (diff) | |
make popup dialogs appear on the active monitor with xinerama
Diffstat (limited to 'openbox/screen.c')
| -rw-r--r-- | openbox/screen.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/openbox/screen.c b/openbox/screen.c index 9cfc1850..a9b045ff 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -731,7 +731,7 @@ void screen_desktop_popup(guint d, gboolean show) if (!show) { pager_popup_hide(desktop_cycle_popup); } else { - a = screen_physical_area_monitor(0); + a = screen_physical_area_monitor_active(); pager_popup_position(desktop_cycle_popup, CenterGravity, a->x + a->width / 2, a->y + a->height / 2); pager_popup_icon_size_multiplier(desktop_cycle_popup, @@ -1365,6 +1365,24 @@ Rect *screen_physical_area_monitor(guint head) return &monitor_area[head]; } +Rect *screen_physical_area_monitor_active() +{ + Rect *a; + gint x, y; + + if (focus_client) + a = screen_physical_area_monitor(client_monitor(focus_client)); + else { + Rect mon; + if (screen_pointer_pos(&x, &y)) + RECT_SET(mon, x, y, 1, 1); + else + RECT_SET(mon, 0, 0, 1, 1); + a = screen_physical_area_monitor(screen_find_monitor(&mon)); + } + return a; +} + void screen_set_root_cursor() { if (sn_app_starting()) |
