/* this is used to grab the keyboard and mouse to an offscreen window */ gboolean gs_grab_grab_offscreen (GSGrab *grab, gboolean hide_cursor) { GdkScreen *screen; gboolean res; gs_debug ("Grabbing an offscreen window"); screen = gtk_invisible_get_screen (GTK_INVISIBLE (grab->priv->invisible)); res = gs_grab_grab_window (grab, gtk_widget_get_window (grab->priv->invisible), screen, hide_cursor); return res; }
/* this is used to grab the keyboard and mouse to an offscreen window */ gboolean gs_grab_grab_offscreen (GSGrab *grab, gboolean hide_cursor) { GdkScreen *screen; gboolean res; gs_debug ("Grabbing an offscreen window"); screen = gtk_invisible_get_screen (GTK_INVISIBLE (grab->priv->invisible)); #if GTK_CHECK_VERSION (3, 0, 0) res = gs_grab_grab_window (grab, gtk_widget_get_window (GTK_WIDGET (grab->priv->invisible)), screen, hide_cursor); #else res = gs_grab_grab_window (grab, grab->priv->invisible->window, screen, hide_cursor); #endif return res; }
int clip_GTK_INVISIBLEGETSCREEN(ClipMachine * ClipMachineMemory) { C_widget *cinvis = _fetch_cw_arg(ClipMachineMemory); GdkScreen *screen; C_object *cscreen; CHECKCWID(cinvis, GTK_IS_INVISIBLE); screen = gtk_invisible_get_screen(GTK_INVISIBLE(cinvis->widget)); if (screen) { cscreen = _list_get_cobject(ClipMachineMemory, screen); if (!cscreen) cscreen = _register_object(ClipMachineMemory, screen, GDK_TYPE_SCREEN, NULL, NULL); if (cscreen) _clip_mclone(ClipMachineMemory, RETPTR(ClipMachineMemory), &cscreen->obj); } return 0; err: return 1; }