export if the keyboard and pointer are currently grabbed or not
This commit is contained in:
parent
087ea0e5cb
commit
32047fd66c
2 changed files with 15 additions and 3 deletions
|
@ -32,10 +32,21 @@
|
||||||
|
|
||||||
/*! A list of all possible combinations of keyboard lock masks */
|
/*! A list of all possible combinations of keyboard lock masks */
|
||||||
static unsigned int mask_list[MASK_LIST_SIZE];
|
static unsigned int mask_list[MASK_LIST_SIZE];
|
||||||
|
static guint kgrabs = 0;
|
||||||
|
static guint pgrabs = 0;
|
||||||
|
|
||||||
|
gboolean grab_on_keyboard()
|
||||||
|
{
|
||||||
|
return kgrabs > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean grab_on_pointer()
|
||||||
|
{
|
||||||
|
return pgrabs > 0;
|
||||||
|
}
|
||||||
|
|
||||||
gboolean grab_keyboard(gboolean grab)
|
gboolean grab_keyboard(gboolean grab)
|
||||||
{
|
{
|
||||||
static guint kgrabs = 0;
|
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
|
|
||||||
if (grab) {
|
if (grab) {
|
||||||
|
@ -56,7 +67,6 @@ gboolean grab_keyboard(gboolean grab)
|
||||||
|
|
||||||
gboolean grab_pointer(gboolean grab, ObCursor cur)
|
gboolean grab_pointer(gboolean grab, ObCursor cur)
|
||||||
{
|
{
|
||||||
static guint pgrabs = 0;
|
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
|
|
||||||
if (grab) {
|
if (grab) {
|
||||||
|
@ -77,7 +87,6 @@ gboolean grab_pointer(gboolean grab, ObCursor cur)
|
||||||
|
|
||||||
gboolean grab_pointer_window(gboolean grab, ObCursor cur, Window win)
|
gboolean grab_pointer_window(gboolean grab, ObCursor cur, Window win)
|
||||||
{
|
{
|
||||||
static guint pgrabs = 0;
|
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
|
|
||||||
if (grab) {
|
if (grab) {
|
||||||
|
|
|
@ -32,6 +32,9 @@ gboolean grab_pointer(gboolean grab, ObCursor cur);
|
||||||
gboolean grab_pointer_window(gboolean grab, ObCursor cur, Window win);
|
gboolean grab_pointer_window(gboolean grab, ObCursor cur, Window win);
|
||||||
gint grab_server(gboolean grab);
|
gint grab_server(gboolean grab);
|
||||||
|
|
||||||
|
gboolean grab_on_keyboard();
|
||||||
|
gboolean grab_on_pointer();
|
||||||
|
|
||||||
void grab_button(guint button, guint state, Window win, guint mask);
|
void grab_button(guint button, guint state, Window win, guint mask);
|
||||||
void grab_button_full(guint button, guint state, Window win, guint mask,
|
void grab_button_full(guint button, guint state, Window win, guint mask,
|
||||||
int pointer_mode, ObCursor cursor);
|
int pointer_mode, ObCursor cursor);
|
||||||
|
|
Loading…
Reference in a new issue