Seiji Zenitani
zenit****@users*****
2006年 12月 27日 (水) 00:28:33 JST
Index: transparency3/transparency3-macui.patch diff -u transparency3/transparency3-macui.patch:1.1.1.1 transparency3/transparency3-macui.patch:1.2 --- transparency3/transparency3-macui.patch:1.1.1.1 Tue Dec 26 11:56:24 2006 +++ transparency3/transparency3-macui.patch Wed Dec 27 00:28:33 2006 @@ -1,7 +1,7 @@ diff -N -u -r emacs.orig/src/macfns.c emacs/src/macfns.c --- emacs.orig/src/macfns.c 2005-10-09 23:55:50.000000000 +0900 +++ emacs/src/macfns.c 2005-10-10 00:11:26.000000000 +0900 -@@ -2145,6 +2145,75 @@ +@@ -2145,6 +2145,74 @@ #endif } @@ -17,15 +17,10 @@ + struct frame *f = XFRAME (selected_frame); + int alpha = GetControlValue( control ); + -+ if( alpha > 100 ){ ++ if( alpha < 0 || 100 < alpha ) + alpha = 100; -+ } -+/* if( alpha < 0 ){ -+ alpha = 0; -+ }*/ -+ if( alpha < frame_alpha_lower_limit ){ ++ if( alpha < frame_alpha_lower_limit ) + alpha = frame_alpha_lower_limit; -+ } + + BLOCK_INPUT; + f->alpha[0] = alpha; @@ -62,7 +57,11 @@ + DisposeNibReference(nibRef); + + GetControlByID( sheet, &kSlider, &AlphaControl ); -+ SetControlValue( AlphaControl, f->alpha[0] ); ++ if (f->alpha[0] < 0) { ++ SetControlValue( AlphaControl, 100 ); ++ } else { ++ SetControlValue( AlphaControl, f->alpha[0] ); ++ } + SetControlAction( AlphaControl, NewEventHandlerUPP(AlphaProc) ); + + GetControlByID( sheet, &kOKButton, &OKControl ); Index: transparency3/transparency3.patch diff -u transparency3/transparency3.patch:1.1.1.1 transparency3/transparency3.patch:1.2 --- transparency3/transparency3.patch:1.1.1.1 Tue Dec 26 11:56:24 2006 +++ transparency3/transparency3.patch Wed Dec 27 00:28:33 2006 @@ -42,7 +42,7 @@ int extra_line_spacing; + /* Opacity of the Frame */ -+ double alpha[2]; ++ int alpha[2]; + /* Set to non-zero in change_frame_size when size of frame changed Clear the frame in clear_garbaged_frames if set. */ @@ -197,9 +197,9 @@ + UNBLOCK_INPUT; + + if (dpyinfo->x_highlight_frame == f) -+ alpha = f->alpha[0] / 100; ++ alpha = f->alpha[0] / 100.0; + else -+ alpha = f->alpha[1] / 100; ++ alpha = f->alpha[1] / 100.0; + if (alpha < 0.0) alpha = 1.0; + + if ((err == noErr) && (response >= 0x1020)) { @@ -370,9 +370,9 @@ + double alpha = 1.0; + + if (dpyinfo->x_highlight_frame == f) -+ alpha = f->alpha[0] / 100; ++ alpha = f->alpha[0] / 100.0; + else -+ alpha = f->alpha[1] / 100; ++ alpha = f->alpha[1] / 100.0; + if (alpha < 0.0) alpha = 1.0; + + /* Courtesy of Nakayama-san [Macemacsjp-users 1211] */ @@ -584,9 +584,9 @@ + double alpha = 1.0; + + if (dpyinfo->x_highlight_frame == f) -+ alpha = f->alpha[0] / 100; ++ alpha = f->alpha[0] / 100.0; + else -+ alpha = f->alpha[1] / 100; ++ alpha = f->alpha[1] / 100.0; + if (alpha < 0.0) alpha = 1.0; + + if (set_layered_window_attributes_fn != NULL) {