[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/xselect.c,v
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/src/xselect.c,v |
Date: |
Wed, 29 Aug 2007 05:28:22 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Miles Bader <miles> 07/08/29 05:28:10
Index: src/xselect.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xselect.c,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -b -r1.171 -r1.172
--- src/xselect.c 3 Aug 2007 05:49:59 -0000 1.171
+++ src/xselect.c 29 Aug 2007 05:27:54 -0000 1.172
@@ -398,11 +398,18 @@
Lisp_Object selection_name, selection_value;
{
struct frame *sf = SELECTED_FRAME ();
- Window selecting_window = FRAME_X_WINDOW (sf);
- Display *display = FRAME_X_DISPLAY (sf);
+ Window selecting_window;
+ Display *display;
Time time = last_event_timestamp;
Atom selection_atom;
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (sf);
+ struct x_display_info *dpyinfo;
+
+ if (! FRAME_X_P (sf))
+ return;
+
+ selecting_window = FRAME_X_WINDOW (sf);
+ display = FRAME_X_DISPLAY (sf);
+ dpyinfo = FRAME_X_DISPLAY_INFO (sf);
CHECK_SYMBOL (selection_name);
selection_atom = symbol_to_x_atom (dpyinfo, display, selection_name);
@@ -671,7 +678,8 @@
FOR_EACH_FRAME (list, frame)
{
- if (FRAME_X_DISPLAY_INFO (XFRAME (frame)) == dpyinfo)
+ if (FRAME_X_P (XFRAME (frame))
+ && FRAME_X_DISPLAY_INFO (XFRAME (frame)) == dpyinfo)
return frame;
}
@@ -1014,6 +1022,7 @@
TRACE0 ("x_handle_selection_clear");
+#ifdef MULTI_KBOARD
/* If the new selection owner is also Emacs,
don't clear the new selection. */
BLOCK_INPUT;
@@ -1021,7 +1030,7 @@
to see if this Emacs job now owns the selection
through that display. */
for (t_dpyinfo = x_display_list; t_dpyinfo; t_dpyinfo = t_dpyinfo->next)
- if (t_dpyinfo->kboard == dpyinfo->kboard)
+ if (t_dpyinfo->terminal->kboard == dpyinfo->terminal->kboard)
{
Window owner_window
= XGetSelectionOwner (t_dpyinfo->display, selection);
@@ -1032,6 +1041,7 @@
}
}
UNBLOCK_INPUT;
+#endif
selection_symbol = x_atom_to_symbol (display, selection);
@@ -1380,17 +1390,26 @@
Lisp_Object selection_symbol, target_type, time_stamp;
{
struct frame *sf = SELECTED_FRAME ();
- Window requestor_window = FRAME_X_WINDOW (sf);
- Display *display = FRAME_X_DISPLAY (sf);
- struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (sf);
+ Window requestor_window;
+ Display *display;
+ struct x_display_info *dpyinfo;
Time requestor_time = last_event_timestamp;
- Atom target_property = dpyinfo->Xatom_EMACS_TMP;
- Atom selection_atom = symbol_to_x_atom (dpyinfo, display, selection_symbol);
+ Atom target_property;
+ Atom selection_atom;
Atom type_atom;
int secs, usecs;
int count = SPECPDL_INDEX ();
Lisp_Object frame;
+ if (! FRAME_X_P (sf))
+ return Qnil;
+
+ requestor_window = FRAME_X_WINDOW (sf);
+ display = FRAME_X_DISPLAY (sf);
+ dpyinfo = FRAME_X_DISPLAY_INFO (sf);
+ target_property = dpyinfo->Xatom_EMACS_TMP;
+ selection_atom = symbol_to_x_atom (dpyinfo, display, selection_symbol);
+
if (CONSP (target_type))
type_atom = symbol_to_x_atom (dpyinfo, display, XCAR (target_type));
else
@@ -2206,6 +2225,9 @@
struct frame *sf = SELECTED_FRAME ();
check_x ();
+ if (! FRAME_X_P (sf))
+ return Qnil;
+
display = FRAME_X_DISPLAY (sf);
dpyinfo = FRAME_X_DISPLAY_INFO (sf);
CHECK_SYMBOL (selection);
@@ -2367,6 +2389,10 @@
struct frame *sf = SELECTED_FRAME ();
check_x ();
+
+ if (! FRAME_X_P (sf))
+ return Qnil;
+
display = FRAME_X_DISPLAY (sf);
dpyinfo = FRAME_X_DISPLAY_INFO (sf);
window = RootWindow (display, 0); /* Cut buffers are on screen 0 */
@@ -2407,6 +2433,10 @@
struct frame *sf = SELECTED_FRAME ();
check_x ();
+
+ if (! FRAME_X_P (sf))
+ return Qnil;
+
display = FRAME_X_DISPLAY (sf);
window = RootWindow (display, 0); /* Cut buffers are on screen 0 */
@@ -2465,6 +2495,10 @@
struct frame *sf = SELECTED_FRAME ();
check_x ();
+
+ if (! FRAME_X_P (sf))
+ return Qnil;
+
display = FRAME_X_DISPLAY (sf);
window = RootWindow (display, 0); /* Cut buffers are on screen 0 */
CHECK_NUMBER (n);