Skip to content

Commit 9dbe701

Browse files
committed
patch 8.2.2674: Motif: cancelling the font dialog resets the font
Problem: Motif: cancelling the font dialog resets the font. Solution: When no font is selected to not change the font. (closes #7825, closes #8035) Fix compiler warnings.
1 parent 3215466 commit 9dbe701

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

src/gui_motif.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1996,7 +1996,11 @@ do_mnemonic(Widget w, unsigned int keycode)
19961996
* Callback routine for dialog mnemonic processing.
19971997
*/
19981998
static void
1999-
mnemonic_event(Widget w, XtPointer call_data UNUSED, XKeyEvent *event)
1999+
mnemonic_event(
2000+
Widget w,
2001+
XtPointer call_data UNUSED,
2002+
XKeyEvent *event,
2003+
Boolean *b UNUSED)
20002004
{
20012005
do_mnemonic(w, event->keycode);
20022006
}
@@ -3565,7 +3569,8 @@ find_replace_callback(
35653569
find_replace_keypress(
35663570
Widget w UNUSED,
35673571
SharedFindReplace *frdp,
3568-
XKeyEvent *event)
3572+
XKeyEvent *event,
3573+
Boolean *b UNUSED)
35693574
{
35703575
KeySym keysym;
35713576

src/gui_x11.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1753,7 +1753,13 @@ gui_mch_init_font(
17531753
// A font name equal "*" is indicating, that we should activate the font
17541754
// selection dialogue to get a new font name. So let us do it here.
17551755
if (font_name != NULL && STRCMP(font_name, "*") == 0)
1756+
{
17561757
font_name = gui_xm_select_font(hl_get_font_name());
1758+
1759+
// Do not reset to default font except on GUI startup.
1760+
if (font_name == NULL && !gui.starting)
1761+
return OK;
1762+
}
17571763
#endif
17581764

17591765
#ifdef FEAT_XFONTSET

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2674,
753755
/**/
754756
2673,
755757
/**/

0 commit comments

Comments
 (0)