Add meta_display_get_grab_op()
Add a function to determine the current grab op. This can be useful in a plugin to avoid over-grabbing an X grab held by Mutter. http://bugzilla.gnome.org/show_bug.cgi?id=593399
This commit is contained in:
parent
a69ce37546
commit
d042dba4d6
@ -3725,6 +3725,21 @@ meta_display_end_grab_op (MetaDisplay *display,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_display_get_grab_op:
|
||||
* Gets the current grab operation, if any.
|
||||
*
|
||||
* Return value: the current grab operation, or %META_GRAB_OP_NONE if
|
||||
* Mutter doesn't currently have a grab. %META_GRAB_OP_COMPOSITOR will
|
||||
* be returned if a compositor-plugin modal operation is in effect
|
||||
* (See mutter_begin_modal_for_plugin())
|
||||
*/
|
||||
MetaGrabOp
|
||||
meta_display_get_grab_op (MetaDisplay *display)
|
||||
{
|
||||
return display->grab_op;
|
||||
}
|
||||
|
||||
void
|
||||
meta_display_check_threshold_reached (MetaDisplay *display,
|
||||
int x,
|
||||
|
@ -114,6 +114,10 @@ gboolean meta_display_begin_grab_op (MetaDisplay *display,
|
||||
int root_y);
|
||||
void meta_display_end_grab_op (MetaDisplay *display,
|
||||
guint32 timestamp);
|
||||
|
||||
MetaGrabOp meta_display_get_grab_op (MetaDisplay *display);
|
||||
|
||||
|
||||
/* meta_display_set_input_focus_window is like XSetInputFocus, except
|
||||
* that (a) it can't detect timestamps later than the current time,
|
||||
* since Mutter isn't part of the XServer, and thus gives erroneous
|
||||
|
Loading…
Reference in New Issue
Block a user