API for enabling/disabling input to stage window.
This commit is contained in:
parent
8d373e009d
commit
ae906b318a
@ -29,6 +29,9 @@
|
|||||||
|
|
||||||
#include <gmodule.h>
|
#include <gmodule.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/extensions/Xfixes.h>
|
||||||
|
#include <X11/extensions/shape.h>
|
||||||
|
|
||||||
static gboolean meta_compositor_clutter_plugin_manager_reload (MetaCompositorClutterPluginManager *mgr);
|
static gboolean meta_compositor_clutter_plugin_manager_reload (MetaCompositorClutterPluginManager *mgr);
|
||||||
|
|
||||||
@ -710,3 +713,33 @@ meta_comp_clutter_plugin_effect_completed (MetaCompositorClutterPlugin *plugin,
|
|||||||
meta_compositor_clutter_window_effect_completed (actor, event);
|
meta_compositor_clutter_window_effect_completed (actor, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_comp_clutter_plugin_set_stage_reactive (MetaCompositorClutterPlugin *plugin,
|
||||||
|
gboolean reactive)
|
||||||
|
{
|
||||||
|
MetaCompositorClutterPluginPrivate *priv = plugin->manager_private;
|
||||||
|
MetaCompositorClutterPluginManager *mgr = priv->self;
|
||||||
|
MetaDisplay *display = meta_screen_get_display (mgr->screen);
|
||||||
|
Display *xdpy = meta_display_get_xdisplay (display);
|
||||||
|
Window overlay;
|
||||||
|
|
||||||
|
overlay = meta_compositor_clutter_get_overlay_window (mgr->screen);
|
||||||
|
|
||||||
|
static XserverRegion region = None;
|
||||||
|
|
||||||
|
if (region == None)
|
||||||
|
region = XFixesCreateRegion (xdpy, NULL, 0);
|
||||||
|
|
||||||
|
if (reactive)
|
||||||
|
{
|
||||||
|
XFixesSetWindowShapeRegion (xdpy, overlay,
|
||||||
|
ShapeInput, 0, 0, None);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
XFixesSetWindowShapeRegion (xdpy, overlay,
|
||||||
|
ShapeInput, 0, 0, region);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -2247,6 +2247,15 @@ meta_compositor_clutter_new (MetaDisplay *display)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Window
|
||||||
|
meta_compositor_clutter_get_overlay_window (MetaScreen *screen)
|
||||||
|
{
|
||||||
|
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
||||||
|
|
||||||
|
return info->output;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ------------------------------- */
|
/* ------------------------------- */
|
||||||
/* Shadow Generation */
|
/* Shadow Generation */
|
||||||
|
|
||||||
|
@ -243,4 +243,9 @@ meta_comp_clutter_plugin_get_overlay_group (MetaCompositorClutterPlugin *plugin)
|
|||||||
|
|
||||||
ClutterActor *
|
ClutterActor *
|
||||||
meta_comp_clutter_plugin_get_stage (MetaCompositorClutterPlugin *plugin);
|
meta_comp_clutter_plugin_get_stage (MetaCompositorClutterPlugin *plugin);
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_comp_clutter_plugin_set_stage_reactive (MetaCompositorClutterPlugin *plugin,
|
||||||
|
gboolean reactive);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -70,4 +70,7 @@ void meta_compositor_clutter_window_effect_completed (MetaCompWindow *actor, gul
|
|||||||
ClutterActor * meta_compositor_clutter_get_stage_for_screen (MetaScreen *screen);
|
ClutterActor * meta_compositor_clutter_get_stage_for_screen (MetaScreen *screen);
|
||||||
ClutterActor * meta_compositor_clutter_get_overlay_group_for_screen (MetaScreen *screen);
|
ClutterActor * meta_compositor_clutter_get_overlay_group_for_screen (MetaScreen *screen);
|
||||||
|
|
||||||
|
Window meta_compositor_clutter_get_overlay_window (MetaScreen *screen);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user