[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src ChangeLog frame.c nsfns.m nsterm.m
From: |
Seiji Zenitani |
Subject: |
[Emacs-diffs] emacs/src ChangeLog frame.c nsfns.m nsterm.m |
Date: |
Fri, 28 Nov 2008 05:40:40 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Seiji Zenitani <zenitani> 08/11/28 05:40:40
Modified files:
src : ChangeLog frame.c nsfns.m nsterm.m
Log message:
* frame.c (x_set_alpha) [NS_IMPL_COCOA]: Call x_set_frame_alpha.
* nsfns.m (ns_frame_parm_handlers): Set alpha handler.
* nsterm.m (x_set_frame_alpha): New function.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/ChangeLog?cvsroot=emacs&r1=1.7129&r2=1.7130
http://cvs.savannah.gnu.org/viewcvs/emacs/src/frame.c?cvsroot=emacs&r1=1.398&r2=1.399
http://cvs.savannah.gnu.org/viewcvs/emacs/src/nsfns.m?cvsroot=emacs&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/emacs/src/nsterm.m?cvsroot=emacs&r1=1.38&r2=1.39
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/src/ChangeLog,v
retrieving revision 1.7129
retrieving revision 1.7130
diff -u -b -r1.7129 -r1.7130
--- ChangeLog 27 Nov 2008 20:18:34 -0000 1.7129
+++ ChangeLog 28 Nov 2008 05:40:36 -0000 1.7130
@@ -1,3 +1,11 @@
+2008-11-28 Seiji Zenitani <address@hidden>
+
+ * frame.c (x_set_alpha) [NS_IMPL_COCOA]: Call x_set_frame_alpha.
+
+ * nsfns.m (ns_frame_parm_handlers): Set alpha handler.
+
+ * nsterm.m (x_set_frame_alpha): New function.
+
2008-11-27 Eli Zaretskii <address@hidden>
* xfaces.c (Fx_font_family_list, syms_of_xfaces): Fix last change.
Index: frame.c
===================================================================
RCS file: /sources/emacs/emacs/src/frame.c,v
retrieving revision 1.398
retrieving revision 1.399
diff -u -b -r1.398 -r1.399
--- frame.c 12 Nov 2008 15:52:12 -0000 1.398
+++ frame.c 28 Nov 2008 05:40:39 -0000 1.399
@@ -3678,7 +3678,7 @@
for (i = 0; i < 2; i++)
f->alpha[i] = newval[i];
-#if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI)
+#if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI) || defined (NS_IMPL_COCOA)
BLOCK_INPUT;
x_set_frame_alpha (f);
UNBLOCK_INPUT;
Index: nsfns.m
===================================================================
RCS file: /sources/emacs/emacs/src/nsfns.m,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- nsfns.m 25 Nov 2008 02:45:39 -0000 1.27
+++ nsfns.m 28 Nov 2008 05:40:39 -0000 1.28
@@ -1040,7 +1040,7 @@
0, /* x_set_wait_for_wm, will ignore */
0, /* x_set_fullscreen will ignore */
x_set_font_backend, /* generic OK */
- 0
+ x_set_alpha
};
Index: nsterm.m
===================================================================
RCS file: /sources/emacs/emacs/src/nsterm.m,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- nsterm.m 25 Nov 2008 04:39:29 -0000 1.38
+++ nsterm.m 28 Nov 2008 05:40:39 -0000 1.39
@@ -964,9 +964,15 @@
dpyinfo->x_highlight_frame != old_highlight)
{
if (old_highlight)
+ {
x_update_cursor (old_highlight, 1);
+ x_set_frame_alpha (old_highlight);
+ }
if (dpyinfo->x_highlight_frame)
+ {
x_update_cursor (dpyinfo->x_highlight_frame, 1);
+ x_set_frame_alpha (dpyinfo->x_highlight_frame);
+ }
}
}
@@ -1634,6 +1640,39 @@
}
+void
+x_set_frame_alpha (struct frame *f)
+/* --------------------------------------------------------------------------
+ change the entire-frame transparency
+ --------------------------------------------------------------------------
*/
+{
+ struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (f);
+ EmacsView *view = FRAME_NS_VIEW (f);
+ double alpha = 1.0;
+ double alpha_min = 1.0;
+
+ if (dpyinfo->x_highlight_frame == f)
+ alpha = f->alpha[0];
+ else
+ alpha = f->alpha[1];
+
+ if (FLOATP (Vframe_alpha_lower_limit))
+ alpha_min = XFLOAT_DATA (Vframe_alpha_lower_limit);
+ else if (INTEGERP (Vframe_alpha_lower_limit))
+ alpha_min = (XINT (Vframe_alpha_lower_limit)) / 100.0;
+
+ if (alpha < 0.0)
+ return;
+ else if (1.0 < alpha)
+ alpha = 1.0;
+ else if (0.0 <= alpha && alpha < alpha_min && alpha_min <= 1.0)
+ alpha = alpha_min;
+
+#ifdef NS_IMPL_COCOA
+ [[view window] setAlphaValue: alpha];
+#endif
+}
+
/* ==========================================================================
@@ -5009,7 +5048,10 @@
/* FIXME: for some reason needed on second and subsequent clicks away
from sole-frame Emacs to get hollow box to show */
if (!windowClosing && [[self window] isVisible] == YES)
+ {
x_update_cursor (emacsframe, 1);
+ x_set_frame_alpha (emacsframe);
+ }
if (emacs_event)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/src ChangeLog frame.c nsfns.m nsterm.m,
Seiji Zenitani <=