summaryrefslogtreecommitdiff
path: root/gdk/x11/gdkdisplay-x11.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2008-07-18 15:03:42 +0200
committerAlexander Larsson <alex@localhost.localdomain>2009-04-02 10:14:01 +0200
commiteabac453e652d5aa2e535d957057f9c84803eea9 (patch)
tree963368271158f24a17f58f67bfdd8b0bedbb2c07 /gdk/x11/gdkdisplay-x11.c
parente2a2ba9d9889ba96059bc1c2c141088a1baeecd3 (diff)
downloadgtk+-eabac453e652d5aa2e535d957057f9c84803eea9.tar.gz
Initial client-side-windows work
The history before this was kind of twisted as several different approaches were tested, so that was all squashed into this initial commit to hide the uninteresting changes and files that were later removed.
Diffstat (limited to 'gdk/x11/gdkdisplay-x11.c')
-rw-r--r--gdk/x11/gdkdisplay-x11.c42
1 files changed, 15 insertions, 27 deletions
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index c51a4956f2..37199c3887 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -600,7 +600,7 @@ _gdk_x11_display_is_root_window (GdkDisplay *display,
*/
void
gdk_display_pointer_ungrab (GdkDisplay *display,
- guint32 time)
+ guint32 time_)
{
Display *xdisplay;
GdkDisplayX11 *display_x11;
@@ -610,33 +610,19 @@ gdk_display_pointer_ungrab (GdkDisplay *display,
display_x11 = GDK_DISPLAY_X11 (display);
xdisplay = GDK_DISPLAY_XDISPLAY (display);
- _gdk_input_ungrab_pointer (display, time);
- XUngrabPointer (xdisplay, time);
+ _gdk_input_ungrab_pointer (display, time_);
+ XUngrabPointer (xdisplay, time_);
XFlush (xdisplay);
- if (time == GDK_CURRENT_TIME ||
- display_x11->pointer_xgrab_time == GDK_CURRENT_TIME ||
- !XSERVER_TIME_IS_LATER (display_x11->pointer_xgrab_time, time))
- display_x11->pointer_xgrab_window = NULL;
-}
-
-/**
- * gdk_display_pointer_is_grabbed:
- * @display: a #GdkDisplay
- *
- * Test if the pointer is grabbed.
- *
- * Returns: %TRUE if an active X pointer grab is in effect
- *
- * Since: 2.2
- */
-gboolean
-gdk_display_pointer_is_grabbed (GdkDisplay *display)
-{
- g_return_val_if_fail (GDK_IS_DISPLAY (display), TRUE);
-
- return (GDK_DISPLAY_X11 (display)->pointer_xgrab_window != NULL &&
- !GDK_DISPLAY_X11 (display)->pointer_xgrab_implicit);
+ if (time_ == GDK_CURRENT_TIME ||
+ display->pointer_grab.time == GDK_CURRENT_TIME ||
+ !XSERVER_TIME_IS_LATER (display->pointer_grab.time, time_))
+ {
+ _gdk_display_unset_has_pointer_grab (display,
+ FALSE,
+ FALSE,
+ time_);
+ }
}
/**
@@ -1335,7 +1321,9 @@ gdk_display_store_clipboard (GdkDisplay *display,
{
GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (display);
Atom clipboard_manager, save_targets;
-
+
+ g_return_if_fail (GDK_WINDOW_IS_X11 (clipboard_window));
+
clipboard_manager = gdk_x11_get_xatom_by_name_for_display (display, "CLIPBOARD_MANAGER");
save_targets = gdk_x11_get_xatom_by_name_for_display (display, "SAVE_TARGETS");