comparison src/gui_gtk_x11.c @ 22659:8623ab39b421 v8.2.1878

patch 8.2.1878: GTK: error for redefining function Commit: https://github.com/vim/vim/commit/8a99e66b4f7616d9b0b9cefe742f82f9122087d5 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Oct 21 16:10:21 2020 +0200 patch 8.2.1878: GTK: error for redefining function Problem: GTK: error for redefining function. (Tony Mechelynck) Solution: Remove "gtk_" prefix from local functions and prepend "gui_" to global functions.
author Bram Moolenaar <Bram@vim.org>
date Wed, 21 Oct 2020 16:15:04 +0200
parents 6c7e4db139a3
children e82579016863
comparison
equal deleted inserted replaced
22658:05d69fc68432 22659:8623ab39b421
3809 tabline_menu = create_tabline_menu(); 3809 tabline_menu = create_tabline_menu();
3810 g_signal_connect_swapped(G_OBJECT(gui.tabline), "button-press-event", 3810 g_signal_connect_swapped(G_OBJECT(gui.tabline), "button-press-event",
3811 G_CALLBACK(on_tabline_menu), G_OBJECT(tabline_menu)); 3811 G_CALLBACK(on_tabline_menu), G_OBJECT(tabline_menu));
3812 #endif // FEAT_GUI_TABLINE 3812 #endif // FEAT_GUI_TABLINE
3813 3813
3814 gui.formwin = gtk_form_new(); 3814 gui.formwin = gui_gtk_form_new();
3815 gtk_container_set_border_width(GTK_CONTAINER(gui.formwin), 0); 3815 gtk_container_set_border_width(GTK_CONTAINER(gui.formwin), 0);
3816 #if !GTK_CHECK_VERSION(3,0,0) 3816 #if !GTK_CHECK_VERSION(3,0,0)
3817 gtk_widget_set_events(gui.formwin, GDK_EXPOSURE_MASK); 3817 gtk_widget_set_events(gui.formwin, GDK_EXPOSURE_MASK);
3818 #endif 3818 #endif
3819 3819
3838 GDK_KEY_RELEASE_MASK | 3838 GDK_KEY_RELEASE_MASK |
3839 GDK_POINTER_MOTION_MASK | 3839 GDK_POINTER_MOTION_MASK |
3840 GDK_POINTER_MOTION_HINT_MASK); 3840 GDK_POINTER_MOTION_HINT_MASK);
3841 3841
3842 gtk_widget_show(gui.drawarea); 3842 gtk_widget_show(gui.drawarea);
3843 gtk_form_put(GTK_FORM(gui.formwin), gui.drawarea, 0, 0); 3843 gui_gtk_form_put(GTK_FORM(gui.formwin), gui.drawarea, 0, 0);
3844 gtk_widget_show(gui.formwin); 3844 gtk_widget_show(gui.formwin);
3845 gtk_box_pack_start(GTK_BOX(vbox), gui.formwin, TRUE, TRUE, 0); 3845 gtk_box_pack_start(GTK_BOX(vbox), gui.formwin, TRUE, TRUE, 0);
3846 3846
3847 // For GtkSockets, key-presses must go to the focus widget (drawarea) 3847 // For GtkSockets, key-presses must go to the focus widget (drawarea)
3848 // and not the window. 3848 // and not the window.
4117 // no. of char-heights), so we have to manually sanitise them. 4117 // no. of char-heights), so we have to manually sanitise them.
4118 // Widths seem to sort themselves out, don't ask me why. 4118 // Widths seem to sort themselves out, don't ask me why.
4119 if (gtk_socket_id != 0) 4119 if (gtk_socket_id != 0)
4120 usable_height -= (gui.char_height - (gui.char_height/2)); // sic. 4120 usable_height -= (gui.char_height - (gui.char_height/2)); // sic.
4121 4121
4122 gtk_form_freeze(GTK_FORM(gui.formwin)); 4122 gui_gtk_form_freeze(GTK_FORM(gui.formwin));
4123 gui_resize_shell(event->width, usable_height); 4123 gui_resize_shell(event->width, usable_height);
4124 gtk_form_thaw(GTK_FORM(gui.formwin)); 4124 gui_gtk_form_thaw(GTK_FORM(gui.formwin));
4125 4125
4126 return TRUE; 4126 return TRUE;
4127 } 4127 }
4128 4128
4129 /* 4129 /*