mutter_plugin_set_stage_input_region()

This commit is contained in:
Tomas Frydrych 2008-10-29 13:03:03 +00:00
parent 7bef175590
commit e4501f801e
2 changed files with 26 additions and 0 deletions

View File

@ -895,6 +895,27 @@ mutter_plugin_set_stage_input_area (MutterPlugin *plugin,
XFixesSetWindowShapeRegion (xdpy, xstage, ShapeInput, 0, 0, region);
XFixesSetWindowShapeRegion (xdpy, xoverlay, ShapeInput, 0, 0, region);
XFixesDestroyRegion (xdpy, region);
}
void
mutter_plugin_set_stage_input_region (MutterPlugin *plugin,
XserverRegion region)
{
MutterPluginPrivate *priv = plugin->manager_private;
MutterPluginManager *mgr = priv->self;
MetaDisplay *display = meta_screen_get_display (mgr->screen);
Display *xdpy = meta_display_get_xdisplay (display);
Window xstage, xoverlay;
ClutterActor *stage;
stage = mutter_get_stage_for_screen (mgr->screen);
xstage = clutter_x11_get_stage_window (CLUTTER_STAGE (stage));
xoverlay = mutter_get_overlay_window (mgr->screen);
XFixesSetWindowShapeRegion (xdpy, xstage, ShapeInput, 0, 0, region);
XFixesSetWindowShapeRegion (xdpy, xoverlay, ShapeInput, 0, 0, region);
}
GList *

View File

@ -29,6 +29,7 @@
#include "compositor-mutter.h"
#include <clutter/clutter.h>
#include <X11/extensions/Xfixes.h>
/*
* This file defines the plugin API.
@ -243,6 +244,10 @@ void
mutter_plugin_set_stage_input_area (MutterPlugin *plugin,
gint x, gint y, gint width, gint height);
void
mutter_plugin_set_stage_input_region (MutterPlugin *plugin,
XserverRegion region);
GList *
mutter_plugin_get_windows (MutterPlugin *plugin);