move ob_pointer_pos to screen_pointer_pos
This commit is contained in:
parent
bddbe94328
commit
1ffc7fa9ec
5 changed files with 13 additions and 14 deletions
|
@ -111,7 +111,7 @@ static gboolean focus_under_pointer()
|
||||||
int x, y;
|
int x, y;
|
||||||
GList *it;
|
GList *it;
|
||||||
|
|
||||||
if (ob_pointer_pos(&x, &y)) {
|
if (screen_pointer_pos(&x, &y)) {
|
||||||
for (it = stacking_list; it != NULL; it = it->next) {
|
for (it = stacking_list; it != NULL; it = it->next) {
|
||||||
if (WINDOW_IS_CLIENT(it->data)) {
|
if (WINDOW_IS_CLIENT(it->data)) {
|
||||||
ObClient *c = WINDOW_AS_CLIENT(it->data);
|
ObClient *c = WINDOW_AS_CLIENT(it->data);
|
||||||
|
|
|
@ -542,16 +542,6 @@ static void parse_args(int argc, char **argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean ob_pointer_pos(int *x, int *y)
|
|
||||||
{
|
|
||||||
Window w;
|
|
||||||
int i;
|
|
||||||
guint u;
|
|
||||||
|
|
||||||
return !!XQueryPointer(ob_display, RootWindow(ob_display, ob_screen),
|
|
||||||
&w, &w, x, y, &i, &i, &u);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef USE_SM
|
#ifdef USE_SM
|
||||||
static void sm_save_yourself(SmcConn conn, SmPointer data, int save_type,
|
static void sm_save_yourself(SmcConn conn, SmPointer data, int save_type,
|
||||||
Bool shutdown, int interact_style, Bool fast)
|
Bool shutdown, int interact_style, Bool fast)
|
||||||
|
|
|
@ -38,7 +38,4 @@ Cursor ob_cursor(ObCursor cursor);
|
||||||
|
|
||||||
KeyCode ob_keycode(ObKey key);
|
KeyCode ob_keycode(ObKey key);
|
||||||
|
|
||||||
/* cuz i have nowhere better to put it right now... */
|
|
||||||
gboolean ob_pointer_pos(int *x, int *y);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -807,3 +807,13 @@ static void sn_event_func(SnMonitorEvent *ev, void *data)
|
||||||
set_root_cursor();
|
set_root_cursor();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
gboolean screen_pointer_pos(int *x, int *y)
|
||||||
|
{
|
||||||
|
Window w;
|
||||||
|
int i;
|
||||||
|
guint u;
|
||||||
|
|
||||||
|
return !!XQueryPointer(ob_display, RootWindow(ob_display, ob_screen),
|
||||||
|
&w, &w, x, y, &i, &i, &u);
|
||||||
|
}
|
||||||
|
|
|
@ -70,4 +70,6 @@ Rect *screen_area(guint desktop);
|
||||||
|
|
||||||
Rect *screen_area_monitor(guint desktop, guint head);
|
Rect *screen_area_monitor(guint desktop, guint head);
|
||||||
|
|
||||||
|
gboolean screen_pointer_pos(int *x, int *y);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue