~ubuntu-core-dev/update-notifier/ubuntu

« back to all changes in this revision

Viewing changes to src/clipboard.c

  • Committer: seb128
  • Date: 2009-06-26 16:07:39 UTC
  • mto: This revision was merged to the branch mainline in revision 465.
  • Revision ID: seb128@seb128-laptop-20090626160739-hs300xxw3o75mz4s
clean libglade use

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
        gboolean retval = FALSE;
48
48
        GtkClipboard *clipboard;
49
49
        Atom atom;
50
 
        Display *display;
51
50
 
52
51
        atom = gdk_x11_get_xatom_by_name (CLIPBOARD_NAME);
53
 
        display = gdk_x11_display_get_xdisplay (gdk_display_get_default ());
54
 
 
55
 
        XGrabServer (display);
56
 
 
57
 
        if (XGetSelectionOwner (display, atom) != None)
 
52
 
 
53
        XGrabServer (GDK_DISPLAY ());
 
54
 
 
55
        if (XGetSelectionOwner (GDK_DISPLAY (), atom) != None)
58
56
                goto out;
59
57
 
60
58
        clipboard = gtk_clipboard_get (gdk_atom_intern (CLIPBOARD_NAME, FALSE));
66
64
                retval = TRUE;
67
65
 
68
66
out:
69
 
        XUngrabServer (display);
 
67
        XUngrabServer (GDK_DISPLAY ());
70
68
        gdk_flush ();
71
69
 
72
70
        return retval;