all repos — openbox @ 76ae19924d79326892f0b851db740d7207e4e158

openbox fork - make it a bit more like ryudo

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.
Dana Jansens danakj@orodu.net
commit

76ae19924d79326892f0b851db740d7207e4e158

parent

4ce98ecf02fc227c4ac286b4cc40e3a82fc8acff

2 files changed, 17 insertions(+), 0 deletions(-)

jump to
M openbox/screen.copenbox/screen.c

@@ -1753,3 +1753,12 @@ break;

} 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; +}
M openbox/screen.hopenbox/screen.h

@@ -164,4 +164,12 @@

/*! Returns the monitor which contains the pointer device */ guint screen_monitor_pointer(void); +/*! Compare the desktop for two windows to see if they are considered on the + same desktop. + Windows that are on "all desktops" are treated like they are only on the + current desktop, so they are only in one place at a time. + @return TRUE if they are on the same desktop, FALSE otherwise. +*/ +gboolean screen_compare_desktops(guint a, guint b); + #endif