diff options
Diffstat (limited to 'src/xterm.c')
-rw-r--r-- | src/xterm.c | 48 |
1 files changed, 27 insertions, 21 deletions
diff --git a/src/xterm.c b/src/xterm.c index 277f0431a3b..977325f0b75 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -8608,15 +8608,15 @@ do_ewmh_fullscreen (f) Atom *atoms = XListProperties (FRAME_X_DISPLAY (f), FRAME_X_DISPLAY_INFO (f)->root_window, &num); - if (atoms && num > 0) + if (atoms && num > 0) { char **names = (char **) xmalloc (num * sizeof(*names)); - if (XGetAtomNames (FRAME_X_DISPLAY (f), atoms, num, names)) + if (XGetAtomNames (FRAME_X_DISPLAY (f), atoms, num, names)) { int i; - for (i = 0; i < num; ++i) + for (i = 0; i < num; ++i) { - if (!have_net_atom) + if (!have_net_atom) have_net_atom = strncmp (names[i], "_NET_", 5) == 0; XFree (names[i]); } @@ -8629,7 +8629,7 @@ do_ewmh_fullscreen (f) FRAME_X_DISPLAY_INFO (f)->have_net_atoms = have_net_atom; } - if (have_net_atom) + if (have_net_atom) { Lisp_Object frame; const char *atom = "_NET_WM_STATE"; @@ -8642,7 +8642,7 @@ do_ewmh_fullscreen (f) /* If there are _NET_ atoms we assume we have extended window manager hints. */ - switch (f->want_fullscreen) + switch (f->want_fullscreen) { case FULLSCREEN_BOTH: what = fs; @@ -8698,7 +8698,7 @@ static void XTfullscreen_hook (f) FRAME_PTR f; { - if (f->async_visible) + if (f->async_visible) { BLOCK_INPUT; do_ewmh_fullscreen (f); @@ -8718,7 +8718,7 @@ x_check_fullscreen (f) { int width, height, ign; - if (do_ewmh_fullscreen (f)) + if (do_ewmh_fullscreen (f)) return; x_real_positions (f, &f->left_pos, &f->top_pos); @@ -9052,20 +9052,26 @@ XTframe_raise_lower (f, raise_flag) { if (raise_flag) { - Lisp_Object frame; - const char *atom = "_NET_ACTIVE_WINDOW"; + /* The following code is needed for `raise-frame' to work on + some versions of metacity; see Window Manager + Specification/Extended Window Manager Hints at + http://freedesktop.org/wiki/Standards_2fwm_2dspec + + However, on other versions (metacity 2.17.2-1.fc7), it + reportedly causes hangs when resizing frames. */ + + /* Lisp_Object frame; + const char *atom = "_NET_ACTIVE_WINDOW"; */ x_raise_frame (f); - /* See Window Manager Specification/Extended Window Manager Hints at - http://freedesktop.org/wiki/Standards_2fwm_2dspec */ - XSETFRAME (frame, f); - Fx_send_client_event (frame, make_number (0), frame, + /* XSETFRAME (frame, f); + Fx_send_client_event (frame, make_number (0), frame, make_unibyte_string (atom, strlen (atom)), make_number (32), Fcons (make_number (1), Fcons (make_number (time (NULL) * 1000), - Qnil))); + Qnil))); */ } else x_lower_frame (f); @@ -10512,8 +10518,8 @@ x_query_font (f, fontname) for (i = 0; i < dpyinfo->n_fonts; i++) if (dpyinfo->font_table[i].name - && (!strcasecmp (dpyinfo->font_table[i].name, fontname) - || !strcasecmp (dpyinfo->font_table[i].full_name, fontname))) + && (!xstricmp (dpyinfo->font_table[i].name, fontname) + || !xstricmp (dpyinfo->font_table[i].full_name, fontname))) return (dpyinfo->font_table + i); return NULL; } @@ -11601,7 +11607,7 @@ syms_of_xterm () DEFVAR_BOOL ("x-use-underline-position-properties", &x_use_underline_position_properties, doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties. -nil means ignore them. If you encounter fonts with bogus +A value of nil means ignore them. If you encounter fonts with bogus UNDERLINE_POSITION font properties, for example 7x13 on XFree prior to 4.1, set this to nil. */); x_use_underline_position_properties = 1; @@ -11609,9 +11615,9 @@ to 4.1, set this to nil. */); DEFVAR_BOOL ("x-underline-at-descent-line", &x_underline_at_descent_line, doc: /* *Non-nil means to draw the underline at the same place as the descent line. -nil means to draw the underline according to the value of the variable -`x-use-underline-position-properties', which is usually at the baseline -level. The default value is nil. */); +A value of nil means to draw the underline according to the value of the +variable `x-use-underline-position-properties', which is usually at the +baseline level. The default value is nil. */); x_underline_at_descent_line = 0; DEFVAR_BOOL ("x-mouse-click-focus-ignore-position", |