[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117564: * xterm.h (struct x_output) [USE_X_TOOLKIT
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] trunk r117564: * xterm.h (struct x_output) [USE_X_TOOLKIT || USE_GTK]: Define |
Date: |
Tue, 22 Jul 2014 10:35:18 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117564
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Tue 2014-07-22 14:34:05 +0400
message:
* xterm.h (struct x_output) [USE_X_TOOLKIT || USE_GTK]: Define
menubar_height as such. Tweak comment.
(FRAME_MENUBAR_HEIGHT) [!USE_X_TOOLKIT && !USE_GTK]: No-op.
* xterm.c (handle_one_xevent):
* gtkutil.c (xg_event_is_for_menubar):
* xfns.c (x_window) [USE_X_TOOLKIT]:
* xmenu.c (set_frame_menubar, free_frame_menubar): Prefer
to use FRAME_MENUBAR_HEIGHT.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/gtkutil.c gtkutil.c-20091113204419-o5vbwnq5f7feedwu-2527
src/xfns.c xfns.c-20091113204419-o5vbwnq5f7feedwu-274
src/xmenu.c xmenu.c-20091113204419-o5vbwnq5f7feedwu-161
src/xterm.c xterm.c-20091113204419-o5vbwnq5f7feedwu-244
src/xterm.h xterm.h-20091113204419-o5vbwnq5f7feedwu-228
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-07-21 16:58:12 +0000
+++ b/src/ChangeLog 2014-07-22 10:34:05 +0000
@@ -1,3 +1,14 @@
+2014-07-22 Dmitry Antipov <address@hidden>
+
+ * xterm.h (struct x_output) [USE_X_TOOLKIT || USE_GTK]: Define
+ menubar_height as such. Tweak comment.
+ (FRAME_MENUBAR_HEIGHT) [!USE_X_TOOLKIT && !USE_GTK]: No-op.
+ * xterm.c (handle_one_xevent):
+ * gtkutil.c (xg_event_is_for_menubar):
+ * xfns.c (x_window) [USE_X_TOOLKIT]:
+ * xmenu.c (set_frame_menubar, free_frame_menubar): Prefer
+ to use FRAME_MENUBAR_HEIGHT.
+
2014-07-21 Dmitry Antipov <address@hidden>
* frame.c (Fframe_parameters): Always report frame height without
=== modified file 'src/gtkutil.c'
--- a/src/gtkutil.c 2014-07-17 10:18:19 +0000
+++ b/src/gtkutil.c 2014-07-22 10:34:05 +0000
@@ -3374,7 +3374,7 @@
if (! (event->xbutton.x >= 0
&& event->xbutton.x < FRAME_PIXEL_WIDTH (f)
&& event->xbutton.y >= 0
- && event->xbutton.y < f->output_data.x->menubar_height
+ && event->xbutton.y < FRAME_MENUBAR_HEIGHT (f)
&& event->xbutton.same_screen))
return 0;
=== modified file 'src/xfns.c'
--- a/src/xfns.c 2014-07-20 16:14:58 +0000
+++ b/src/xfns.c 2014-07-22 10:34:05 +0000
@@ -2274,7 +2274,7 @@
}
#endif
- f->output_data.x->menubar_height = menubar_size;
+ FRAME_MENUBAR_HEIGHT (f) = menubar_size;
#ifndef USE_LUCID
/* Motif seems to need this amount added to the sizes
@@ -2507,10 +2507,6 @@
class_hints.res_class = SSDATA (Vx_resource_class);
XSetClassHint (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), &class_hints);
- /* The menubar is part of the ordinary display;
- it does not count in addition to the height of the window. */
- f->output_data.x->menubar_height = 0;
-
/* This indicates that we use the "Passive Input" input model.
Unless we do this, we don't get the Focus{In,Out} events that we
need to draw the cursor correctly. Accursed bureaucrats.
=== modified file 'src/xmenu.c'
--- a/src/xmenu.c 2014-07-15 09:59:05 +0000
+++ b/src/xmenu.c 2014-07-22 10:34:05 +0000
@@ -1023,7 +1023,7 @@
#endif /* USE_LUCID */
#endif /* 1 */
- f->output_data.x->menubar_height = menubar_size;
+ FRAME_MENUBAR_HEIGHT (f) = menubar_size;
}
#endif /* not USE_GTK */
@@ -1066,7 +1066,7 @@
menubar_widget = f->output_data.x->menubar_widget;
- f->output_data.x->menubar_height = 0;
+ FRAME_MENUBAR_HEIGHT (f) = 0;
if (menubar_widget)
{
=== modified file 'src/xterm.c'
--- a/src/xterm.c 2014-07-20 16:14:58 +0000
+++ b/src/xterm.c 2014-07-22 10:34:05 +0000
@@ -6834,7 +6834,7 @@
&& event->xbutton.x >= 0
&& event->xbutton.x < FRAME_PIXEL_WIDTH (f)
&& event->xbutton.y >= 0
- && event->xbutton.y < f->output_data.x->menubar_height
+ && event->xbutton.y < FRAME_MENUBAR_HEIGHT (f)
&& event->xbutton.same_screen)
{
if (!f->output_data.x->saved_menu_event)
=== modified file 'src/xterm.h'
--- a/src/xterm.h 2014-07-18 11:04:37 +0000
+++ b/src/xterm.h 2014-07-22 10:34:05 +0000
@@ -428,11 +428,11 @@
struct x_output
{
- /* Height of menu bar widget, in pixels.
- Zero if not using the X toolkit.
- When using the toolkit, this value is not meaningful
- if the menubar is turned off. */
+#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
+ /* Height of menu bar widget, in pixels. This value
+ is not meaningful if the menubar is turned off. */
int menubar_height;
+#endif
/* Height of tool bar widget, in pixels. top_height is used if tool bar
at top, bottom_height if tool bar is at the bottom.
@@ -714,10 +714,14 @@
#endif /* !USE_GTK */
#endif
+#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
+#define FRAME_MENUBAR_HEIGHT(f) ((f)->output_data.x->menubar_height)
+#else
+#define FRAME_MENUBAR_HEIGHT(f) ((void) f, 0)
+#endif /* USE_X_TOOLKIT || USE_GTK */
#define FRAME_FONT(f) ((f)->output_data.x->font)
#define FRAME_FONTSET(f) ((f)->output_data.x->fontset)
-#define FRAME_MENUBAR_HEIGHT(f) ((f)->output_data.x->menubar_height)
#define FRAME_TOOLBAR_TOP_HEIGHT(f) ((f)->output_data.x->toolbar_top_height)
#define FRAME_TOOLBAR_BOTTOM_HEIGHT(f) \
((f)->output_data.x->toolbar_bottom_height)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117564: * xterm.h (struct x_output) [USE_X_TOOLKIT || USE_GTK]: Define,
Dmitry Antipov <=