… | |
… | |
908 | selection_wait = Sel_normal; |
908 | selection_wait = Sel_normal; |
909 | selection_type = selnum; |
909 | selection_type = selnum; |
910 | } |
910 | } |
911 | |
911 | |
912 | void |
912 | void |
|
|
913 | rxvt_selection::stop () |
|
|
914 | { |
|
|
915 | free (incr_buf); |
|
|
916 | incr_buf = 0; |
|
|
917 | timer_ev.stop (); |
|
|
918 | x_ev.stop (display); |
|
|
919 | } |
|
|
920 | |
|
|
921 | rxvt_selection::~rxvt_selection () |
|
|
922 | { |
|
|
923 | stop (); |
|
|
924 | } |
|
|
925 | |
|
|
926 | void |
913 | rxvt_selection::run () |
927 | rxvt_selection::run () |
914 | { |
928 | { |
915 | int selnum = selection_type; |
929 | int selnum = selection_type; |
916 | |
930 | |
917 | #if X_HAVE_UTF8_STRING |
931 | #if X_HAVE_UTF8_STRING |
… | |
… | |
926 | |
940 | |
927 | // fallback to CUT_BUFFER0 if the requested property has no owner |
941 | // fallback to CUT_BUFFER0 if the requested property has no owner |
928 | handle_selection (display->root, XA_CUT_BUFFER0, false); |
942 | handle_selection (display->root, XA_CUT_BUFFER0, false); |
929 | } |
943 | } |
930 | |
944 | |
931 | rxvt_selection::~rxvt_selection () |
|
|
932 | { |
|
|
933 | stop (); |
|
|
934 | } |
|
|
935 | |
|
|
936 | void |
945 | void |
937 | rxvt_selection::finish (char *data, unsigned int len) |
946 | rxvt_selection::finish (char *data, unsigned int len) |
938 | { |
947 | { |
939 | if (term) |
948 | if (term) |
940 | { |
949 | { |
… | |
… | |
949 | { |
958 | { |
950 | stop (); |
959 | stop (); |
951 | abort (); //TODO |
960 | abort (); //TODO |
952 | } |
961 | } |
953 | #endif |
962 | #endif |
954 | } |
|
|
955 | |
|
|
956 | void |
|
|
957 | rxvt_selection::stop () |
|
|
958 | { |
|
|
959 | free (incr_buf); |
|
|
960 | incr_buf = 0; |
|
|
961 | timer_ev.stop (); |
|
|
962 | x_ev.stop (display); |
|
|
963 | } |
963 | } |
964 | |
964 | |
965 | bool |
965 | bool |
966 | rxvt_selection::request (Atom target, int selnum) |
966 | rxvt_selection::request (Atom target, int selnum) |
967 | { |
967 | { |