Japanese translation of message catalog for Sawfish Window-Manager
修訂 | 9a957d2adf34b7056c70b471fa28f4df3eaa6452 (tree) |
---|---|
時間 | 2010-11-17 21:56:26 |
作者 | Michal Maruska <mmaruska@gmai...> |
Commiter | Michal Maruska |
comments selection.c
@@ -47,6 +47,7 @@ available for reading. | ||
47 | 47 | Atom selection; |
48 | 48 | rep_DECLARE1 (sel, rep_SYMBOLP); |
49 | 49 | selection = symbol_to_atom (sel); |
50 | + /* if the atom doesn't exist, the selection is not active anyway! */ | |
50 | 51 | return (XGetSelectionOwner (dpy, selection) != None) ? Qt : Qnil; |
51 | 52 | } |
52 | 53 |
@@ -72,13 +73,15 @@ If the selection currently has no value, nil is returned. | ||
72 | 73 | Window owner; |
73 | 74 | rep_DECLARE1 (sel, rep_SYMBOLP); |
74 | 75 | selection = symbol_to_atom (sel); |
75 | - owner = XGetSelectionOwner (dpy, selection); | |
76 | + owner = XGetSelectionOwner (dpy, selection); /* fixme: this is equal to -active-p !! */ | |
76 | 77 | if (owner != None) |
77 | 78 | { |
78 | 79 | XEvent ev; |
79 | 80 | Window sel_window = no_focus_window; |
80 | 81 | XConvertSelection (dpy, selection, XA_STRING, |
81 | 82 | sawfish_selection, sel_window, last_event_time); |
83 | + /* XConvertSelection can generate BadAtom and BadWindow errors */ | |
84 | + /* What if the owner disconnects, shall we receive SelectionClear? */ | |
82 | 85 | XIfEvent (dpy, &ev, selnotify_pred, (XPointer) 0); |
83 | 86 | if (ev.xselection.property != None) |
84 | 87 | { |