Mercurial > vim
comparison src/gui_gtk_x11.c @ 10402:65646e5652df v8.0.0095
commit https://github.com/vim/vim/commit/182707ac10d77359bf7a87c6b23ce4025d5b0ad4
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Nov 21 20:55:58 2016 +0100
patch 8.0.0095
Problem: Problems with GTK 3.22.2 fixed in 3.22.4.
Solution: Adjust the #ifdefs. (Kazunobu Kuriyama)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 21 Nov 2016 21:00:04 +0100 |
parents | 6c8a4d21b873 |
children | a3cef16bea27 |
comparison
equal
deleted
inserted
replaced
10401:7d33f2b6d6ae | 10402:65646e5652df |
---|---|
3100 static int cur_height = 0; | 3100 static int cur_height = 0; |
3101 | 3101 |
3102 g_return_val_if_fail(event | 3102 g_return_val_if_fail(event |
3103 && event->width >= 1 && event->height >= 1, TRUE); | 3103 && event->width >= 1 && event->height >= 1, TRUE); |
3104 | 3104 |
3105 # if GTK_CHECK_VERSION(3,22,2) | 3105 # if GTK_CHECK_VERSION(3,22,2) && !GTK_CHECK_VERSION(3,22,4) |
3106 /* As of 3.22.2, GdkWindows have started distributing configure events to | 3106 /* As of 3.22.2, GdkWindows have started distributing configure events to |
3107 * their "native" children (https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=12579fe71b3b8f79eb9c1b80e429443bcc437dd0). | 3107 * their "native" children (https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=12579fe71b3b8f79eb9c1b80e429443bcc437dd0). |
3108 * | 3108 * |
3109 * As can be seen from the implementation of move_native_children() and | 3109 * As can be seen from the implementation of move_native_children() and |
3110 * configure_native_child() in gdkwindow.c, those functions actually | 3110 * configure_native_child() in gdkwindow.c, those functions actually |
3121 * | 3121 * |
3122 * Obviously, this is a terrible hack making GVim depend on GTK's | 3122 * Obviously, this is a terrible hack making GVim depend on GTK's |
3123 * implementation details. Therefore, watch out any relevant internal | 3123 * implementation details. Therefore, watch out any relevant internal |
3124 * changes happening in GTK in the feature (sigh). | 3124 * changes happening in GTK in the feature (sigh). |
3125 */ | 3125 */ |
3126 /* Follow-up | |
3127 * After a few weeks later, the GdkWindow change mentioned above was | |
3128 * reverted (https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=f70039cb9603a02d2369fec4038abf40a1711155). | |
3129 * The corresponding official release is 3.22.4. */ | |
3126 if (event->send_event == FALSE) | 3130 if (event->send_event == FALSE) |
3127 return TRUE; | 3131 return TRUE; |
3128 # endif | 3132 # endif |
3129 | 3133 |
3130 if (event->width == cur_width && event->height == cur_height) | 3134 if (event->width == cur_width && event->height == cur_height) |
4490 GdkEventConfigure *event, | 4494 GdkEventConfigure *event, |
4491 gpointer data UNUSED) | 4495 gpointer data UNUSED) |
4492 { | 4496 { |
4493 int usable_height = event->height; | 4497 int usable_height = event->height; |
4494 | 4498 |
4495 #if GTK_CHECK_VERSION(3,22,2) | 4499 #if GTK_CHECK_VERSION(3,22,2) && !GTK_CHECK_VERSION(3,22,4) |
4496 /* As of 3.22.2, GdkWindows have started distributing configure events to | 4500 /* As of 3.22.2, GdkWindows have started distributing configure events to |
4497 * their "native" children (https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=12579fe71b3b8f79eb9c1b80e429443bcc437dd0). | 4501 * their "native" children (https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=12579fe71b3b8f79eb9c1b80e429443bcc437dd0). |
4498 * | 4502 * |
4499 * As can be seen from the implementation of move_native_children() and | 4503 * As can be seen from the implementation of move_native_children() and |
4500 * configure_native_child() in gdkwindow.c, those functions actually | 4504 * configure_native_child() in gdkwindow.c, those functions actually |
4506 * gui.formwin. | 4510 * gui.formwin. |
4507 * | 4511 * |
4508 * To filter out such fallacious events, check if the given event is the | 4512 * To filter out such fallacious events, check if the given event is the |
4509 * one that was sent out to the right place. Ignore it if not. | 4513 * one that was sent out to the right place. Ignore it if not. |
4510 */ | 4514 */ |
4515 /* Follow-up | |
4516 * After a few weeks later, the GdkWindow change mentioned above was | |
4517 * reverted (https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=f70039cb9603a02d2369fec4038abf40a1711155). | |
4518 * The corresponding official release is 3.22.4. */ | |
4511 if (event->window != gtk_widget_get_window(gui.formwin)) | 4519 if (event->window != gtk_widget_get_window(gui.formwin)) |
4512 return TRUE; | 4520 return TRUE; |
4513 #endif | 4521 #endif |
4514 | 4522 |
4515 /* When in a GtkPlug, we can't guarantee valid heights (as a round | 4523 /* When in a GtkPlug, we can't guarantee valid heights (as a round |