-s flag in guioptions, stating that it can also be used with GTK.https://github.com/vim/vim/pull/20303
(8 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Thanks, but it causes build failures:
gui_gtk_x11.c:2854:35: error: unused parameter 'widget' [-Werror,-Wunused-parameter]
2854 | mainwin_state_event_cb(GtkWidget *widget,
| ^
gui_gtk_x11.c:2856:19: error: unused parameter 'user_data' [-Werror,-Wunused-parameter]
2856 | gpointer user_data)
| ^
2 errors generated.
make[1]: *** [Makefile:3384: objects/gui_gtk_x11.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/runner/work/vim/vim/src'
make: *** [Makefile:29: first] Error 2
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
@koron pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@koron pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Sorry, I missed the CI results.
I've made the fix (added UNUSED). Please review this again.
To be honest, I didn't know how to enable the UNUSED check during normal builds. I should have applied ci/config.mk.sed and modified src/auto/config.mk.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Tested on GTK4 with the diff below — works.
diff --git a/src/gui_gtk4.c b/src/gui_gtk4.c index 34e9617a32..cf5e5ab876 100644 --- a/src/gui_gtk4.c +++ b/src/gui_gtk4.c @@ -280,6 +280,7 @@ static gboolean drop_cb(GtkDropTarget *target, const GValue *value, double x, do #endif static void mainwin_destroy_cb(GObject *object, gpointer data); static gboolean delete_event_cb(GtkWindow *window, gpointer data); +static void mainwin_fullscreened_cb(GObject *obj, GParamSpec *pspec, gpointer user_data); static void drawarea_realize_cb(GtkWidget *widget, gpointer data); static void drawarea_unrealize_cb(GtkWidget *widget, gpointer data); static void drawarea_resize_cb(GtkDrawingArea *area, int width, int height, gpointer data); @@ -448,6 +449,8 @@ gui_mch_init(void) g_signal_connect(G_OBJECT(gui.mainwin), "close-request", G_CALLBACK(delete_event_cb), NULL); + g_signal_connect(G_OBJECT(gui.mainwin), "notify::fullscreened", + G_CALLBACK(mainwin_fullscreened_cb), NULL); // A vertical box holds the menubar, toolbar and main text window. vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); @@ -733,6 +736,26 @@ gui_mch_unmaximize(void) gtk_window_unmaximize(GTK_WINDOW(gui.mainwin)); } + void +gui_mch_set_fullscreen(int flag) +{ + if (gui.mainwin == NULL) + return; + if (flag) + gtk_window_fullscreen(GTK_WINDOW(gui.mainwin)); + else + gtk_window_unfullscreen(GTK_WINDOW(gui.mainwin)); +} + + static void +mainwin_fullscreened_cb(GObject *obj, + GParamSpec *pspec UNUSED, gpointer user_data UNUSED) +{ + // Force a redraw of the drawing area when entering fullscreen mode. + if (gtk_window_is_fullscreen(GTK_WINDOW(obj))) + gui_focus_change(TRUE); +} + /* * Called when the font changed while the window is maximized or GO_KEEPWINSIZE * is set. Recalculate Rows and Columns based on the current window size. diff --git a/src/proto/gui_gtk4.pro b/src/proto/gui_gtk4.pro index d8ebd6c634..1308574c9b 100644 --- a/src/proto/gui_gtk4.pro +++ b/src/proto/gui_gtk4.pro @@ -16,6 +16,7 @@ int gui_mch_get_winpos(int *x, int *y); void gui_mch_set_winpos(int x, int y); int gui_mch_maximized(void); void gui_mch_unmaximize(void); +void gui_mch_set_fullscreen(int flag); void gui_mch_newfont(void); void gui_mch_settitle(char_u *title, char_u *icon); void gui_mch_set_shellsize(int width, int height, int min_width, int min_height, int base_width, int base_height, int direction);
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
@koron pushed 2 commits.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@mattn Thank you. I've added that patch to this pull request.
And I've rebased it with the current HEAD. Please review it again.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()