diff options
| author | Dana Jansens <danakj@orodu.net> | 2010-10-14 19:39:34 -0400 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2011-01-24 14:19:22 -0500 |
| commit | 76ae19924d79326892f0b851db740d7207e4e158 (patch) | |
| tree | b7d3c4c882612a27c9c89007714cad7fb52c3317 /openbox/screen.c | |
| parent | 4ce98ecf02fc227c4ac286b4cc40e3a82fc8acff (diff) | |
add function screen_compare_desktops()
tells if two windows' current desktops are considered logically on the same
desktop (taking "all desktops" into account)
if a window is on "all desktops" it is considered to be on the current desktop
only - windows can only be in one place at a time.
Diffstat (limited to 'openbox/screen.c')
| -rw-r--r-- | openbox/screen.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/openbox/screen.c b/openbox/screen.c index a94347ed..e0277ede 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -1753,3 +1753,12 @@ gboolean screen_pointer_pos(gint *x, gint *y) } return ret; } + +gboolean screen_compare_desktops(guint a, guint b) +{ + if (a == DESKTOP_ALL) + a = screen_desktop; + if (b == DESKTOP_ALL) + b = screen_desktop; + return a == b; +} |
