summaryrefslogtreecommitdiff
path: root/libmdock
diff options
context:
space:
mode:
Diffstat (limited to 'libmdock')
-rw-r--r--libmdock/mdock-widget.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libmdock/mdock-widget.c b/libmdock/mdock-widget.c
index d7cafd7..b202f8a 100644
--- a/libmdock/mdock-widget.c
+++ b/libmdock/mdock-widget.c
@@ -33,6 +33,7 @@
#include <zeitgeist.h>
#endif
+#define POPUP_MONITOR_EDGE_MARGIN 8
#define POPUP_MOVE_TIMEOUT 100
#define POPUP_SHOW_TIMEOUT 200
#define POPUP_HIDE_TIMEOUT 500
@@ -174,14 +175,14 @@ static void show_item_popup(MDockWidget *self, MDockItem *item)
if (x + requisition.width > monitor.x + monitor.width) {
x -= x - (monitor.x + monitor.width) + requisition.width;
- } else if (x < monitor.x) {
- x = monitor.x;
+ } else if (x < monitor.x + POPUP_MONITOR_EDGE_MARGIN) {
+ x = monitor.x + POPUP_MONITOR_EDGE_MARGIN;
}
if (y + requisition.height > monitor.y + monitor.height) {
y -= y - (monitor.y + monitor.height) + requisition.height;
- } else if (y < monitor.y) {
- y = monitor.y;
+ } else if (y < monitor.y + POPUP_MONITOR_EDGE_MARGIN) {
+ y = monitor.y + POPUP_MONITOR_EDGE_MARGIN;
}
gtk_window_move(GTK_WINDOW(selector), x, y);