• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Japanese translation of message catalog for Sawfish Window-Manager


Commit MetaInfo

修订版4dd6127a23319b8407ea2c3ee1d1f1c50e3bd70a (tree)
时间2002-05-07 12:17:18
作者John Harper <jsh@src....>
CommiterJohn Harper

Log Message

merged more changes from HEAD

更改概述

差异

--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,14 @@
1+2002-05-06 John Harper <jsh@unfactored.org>
2+
3+ * More merging from HEAD:
4+
5+ 2002-04-22 John Harper <jsh@unfactored.org>
6+
7+ * functions.c (Fset_x_text_property): added optional fourth arg
8+ ENCODING-ATOM. To allow #67397 to be fixed
9+
10+ * events.c: more focus change fallout
11+
112 2002-04-21 John Harper <jsh@unfactored.org>
213
314 * Merged changes from HEAD:
--- a/src/events.c
+++ b/src/events.c
@@ -905,6 +905,19 @@ leave_notify (XEvent *ev)
905905 static Lisp_Window *last_focused;
906906
907907 static void
908+report_focus_change (Lisp_Window *w)
909+{
910+ if (w != 0
911+ && w->focus_change != 0
912+ && !WINDOW_IS_GONE_P (w))
913+ {
914+ DB ((" calling focus change %p on %s\n",
915+ w->focus_change, rep_STR(w->name)));
916+ w->focus_change (w);
917+ }
918+}
919+
920+static void
908921 focus_in (XEvent *ev)
909922 {
910923 Lisp_Window *w = find_window_by_id (ev->xfocus.window);
@@ -912,18 +925,16 @@ focus_in (XEvent *ev)
912925 return;
913926 if (w != 0 && w->visible)
914927 {
928+ Lisp_Window *old = focus_window;
915929 focus_window = w;
916930
917931 if (last_focused != w)
918932 {
919933 last_focused = w;
934+ if (old != 0)
935+ report_focus_change (old);
920936 install_colormaps (w);
921- if (w->focus_change != 0)
922- {
923- DB ((" calling focus change %p on %s\n",
924- w->focus_change, rep_STR(w->name)));
925- w->focus_change (w);
926- }
937+ report_focus_change (w);
927938 if (!WINDOW_IS_GONE_P (w))
928939 {
929940 Fcall_window_hook (Qfocus_in_hook, rep_VAL(w),
@@ -945,16 +956,14 @@ focus_out (XEvent *ev)
945956 if (w != 0 && ev->xfocus.detail != NotifyInferior)
946957 {
947958 if (focus_window == w)
959+ {
948960 focus_window = 0;
961+ report_focus_change (w);
962+ }
963+
949964 if (last_focused == w)
950965 {
951966 last_focused = 0;
952- if (w->focus_change != 0)
953- {
954- DB ((" calling focus change %p on %s\n",
955- w->focus_change, rep_STR(w->name)));
956- w->focus_change (w);
957- }
958967 if (!WINDOW_IS_GONE_P (w))
959968 {
960969 Fcall_window_hook (Qfocus_out_hook, rep_VAL(w),
--- a/src/functions.c
+++ b/src/functions.c
@@ -826,13 +826,13 @@ get-x-text-property WINDOW PROPERTY
826826 }
827827
828828 DEFUN("set-x-text-property", Fset_x_text_property, Sset_x_text_property,
829- (repv win, repv prop, repv vect), rep_Subr3) /*
829+ (repv win, repv prop, repv vect, repv enc), rep_Subr4) /*
830830 ::doc:sawfish.wm.misc#set-x-text-prooperty::
831-set-x-text-property WINDOW PROPERTY STRING-VECTOR
831+set-x-text-property WINDOW PROPERTY STRING-VECTOR [ENCODING-ATOM]
832832 ::end:: */
833833 {
834834 Window w;
835- Atom a_prop;
835+ Atom a_prop, enc_atom;
836836 XTextProperty t_prop;
837837 char **strings;
838838 int count, i;
@@ -844,6 +844,11 @@ set-x-text-property WINDOW PROPERTY STRING-VECTOR
844844 return WINDOWP(win) ? Qnil : rep_signal_arg_error (win, 1);
845845 a_prop = XInternAtom (dpy, rep_STR(rep_SYM(prop)->name), False);
846846
847+ if (rep_SYMBOLP (enc))
848+ enc_atom = XInternAtom (dpy, rep_STR(rep_SYM(enc)->name), False);
849+ else
850+ enc_atom = 0;
851+
847852 count = rep_VECT_LEN(vect);
848853 strings = alloca (sizeof (char *) * (count + 1));
849854 for (i = 0; i < count; i++)
@@ -854,6 +859,8 @@ set-x-text-property WINDOW PROPERTY STRING-VECTOR
854859 }
855860 if (XStringListToTextProperty (strings, count, &t_prop) != 0)
856861 {
862+ if (enc_atom != 0)
863+ t_prop.encoding = enc_atom;
857864 XSetTextProperty (dpy, w, &t_prop, a_prop);
858865 XFree (t_prop.value);
859866 }
--- a/src/sawmill_subrs.h
+++ b/src/sawmill_subrs.h
@@ -176,7 +176,7 @@ extern repv Fget_x_property (repv win, repv prop);
176176 extern repv Fset_x_property (repv win, repv prop, repv data,
177177 repv type, repv format);
178178 extern repv Fget_x_text_property (repv win, repv prop);
179-extern repv Fset_x_text_property (repv win, repv prop, repv vect);
179+extern repv Fset_x_text_property (repv win, repv prop, repv vect, repv enc);
180180 extern repv Fsend_client_message (repv win, repv type, repv data, repv format);
181181 extern repv Fcreate_window (repv parent, repv x, repv y,
182182 repv width, repv height);