comparison src/mbyte.c @ 11474:621e41f6dcc2 v8.0.0620

patch 8.0.0620: checking for HAVE_GTK_MULTIHEAD is not needed commit https://github.com/vim/vim/commit/b463e8d999ec812d656876f313efbeaeed663b45 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 5 15:07:09 2017 +0200 patch 8.0.0620: checking for HAVE_GTK_MULTIHEAD is not needed Problem: Since we only support GTK versions that have it, the ckeck for HAVE_GTK_MULTIHEAD is no longer needed. Solution: Remove HAVE_GTK_MULTIHEAD. (Kazunobu Kuriyama)
author Christian Brabandt <cb@256bit.org>
date Mon, 05 Jun 2017 15:15:03 +0200
parents f4ea50924c6d
children f7ba69508fd5
comparison
equal deleted inserted replaced
11473:bd6ff5246c71 11474:621e41f6dcc2
5302 static void 5302 static void
5303 im_synthesize_keypress(unsigned int keyval, unsigned int state) 5303 im_synthesize_keypress(unsigned int keyval, unsigned int state)
5304 { 5304 {
5305 GdkEventKey *event; 5305 GdkEventKey *event;
5306 5306
5307 # ifdef HAVE_GTK_MULTIHEAD
5308 event = (GdkEventKey *)gdk_event_new(GDK_KEY_PRESS); 5307 event = (GdkEventKey *)gdk_event_new(GDK_KEY_PRESS);
5309 # if GTK_CHECK_VERSION(3,0,0) 5308 # if GTK_CHECK_VERSION(3,0,0)
5310 g_object_ref(gtk_widget_get_window(gui.drawarea)); 5309 g_object_ref(gtk_widget_get_window(gui.drawarea));
5311 /* unreffed by gdk_event_free() */ 5310 /* unreffed by gdk_event_free() */
5312 # else 5311 # else
5313 g_object_ref(gui.drawarea->window); /* unreffed by gdk_event_free() */ 5312 g_object_ref(gui.drawarea->window); /* unreffed by gdk_event_free() */
5314 # endif
5315 # else
5316 event = (GdkEventKey *)g_malloc0((gulong)sizeof(GdkEvent));
5317 event->type = GDK_KEY_PRESS;
5318 # endif 5313 # endif
5319 # if GTK_CHECK_VERSION(3,0,0) 5314 # if GTK_CHECK_VERSION(3,0,0)
5320 event->window = gtk_widget_get_window(gui.drawarea); 5315 event->window = gtk_widget_get_window(gui.drawarea);
5321 # else 5316 # else
5322 event->window = gui.drawarea->window; 5317 event->window = gui.drawarea->window;
5335 /* For consistency, also send the corresponding release event. */ 5330 /* For consistency, also send the corresponding release event. */
5336 event->type = GDK_KEY_RELEASE; 5331 event->type = GDK_KEY_RELEASE;
5337 event->send_event = FALSE; 5332 event->send_event = FALSE;
5338 gtk_im_context_filter_keypress(xic, event); 5333 gtk_im_context_filter_keypress(xic, event);
5339 5334
5340 # ifdef HAVE_GTK_MULTIHEAD
5341 gdk_event_free((GdkEvent *)event); 5335 gdk_event_free((GdkEvent *)event);
5342 # else
5343 g_free(event);
5344 # endif
5345 } 5336 }
5346 5337
5347 void 5338 void
5348 xim_reset(void) 5339 xim_reset(void)
5349 { 5340 {