mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 9.0.0984: GUI: remote_foreground() does not always work
Problem: GUI: remote_foreground() does not always work. (Ron Aaron) Solution: For GTK use gtk_window_set_keep_above(). (issue #11641)
This commit is contained in:
parent
184a622ada
commit
023930d62e
@ -780,7 +780,8 @@ draw_event(GtkWidget *widget UNUSED,
|
|||||||
for (i = 0; i < list->num_rectangles; i++)
|
for (i = 0; i < list->num_rectangles; i++)
|
||||||
{
|
{
|
||||||
const cairo_rectangle_t *rect = &list->rectangles[i];
|
const cairo_rectangle_t *rect = &list->rectangles[i];
|
||||||
cairo_rectangle(cr, rect->x, rect->y, rect->width, rect->height);
|
cairo_rectangle(cr, rect->x, rect->y,
|
||||||
|
rect->width, rect->height);
|
||||||
cairo_fill(cr);
|
cairo_fill(cr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6313,7 +6314,17 @@ gui_mch_iconify(void)
|
|||||||
void
|
void
|
||||||
gui_mch_set_foreground(void)
|
gui_mch_set_foreground(void)
|
||||||
{
|
{
|
||||||
|
// Just calling gtk_window_present() used to work in the past, but now this
|
||||||
|
// sequence appears to be needed:
|
||||||
|
// - Show the window on top of others.
|
||||||
|
// - Present the window (also shows it above others).
|
||||||
|
// - Do not the window on top of others (otherwise it would be stuck there).
|
||||||
|
gtk_window_set_keep_above(GTK_WINDOW(gui.mainwin), TRUE);
|
||||||
|
gui_may_flush();
|
||||||
gtk_window_present(GTK_WINDOW(gui.mainwin));
|
gtk_window_present(GTK_WINDOW(gui.mainwin));
|
||||||
|
gui_may_flush();
|
||||||
|
gtk_window_set_keep_above(GTK_WINDOW(gui.mainwin), FALSE);
|
||||||
|
gui_may_flush();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
984,
|
||||||
/**/
|
/**/
|
||||||
983,
|
983,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user