Skip to content

Instantly share code, notes, and snippets.

@samm-git
Created January 3, 2020 12:12
Show Gist options
  • Save samm-git/79f030f93fc7f1b710e732bc22cb867a to your computer and use it in GitHub Desktop.
Save samm-git/79f030f93fc7f1b710e732bc22cb867a to your computer and use it in GitHub Desktop.
diff --git a/src/main.c b/src/main.c
index b992097..cfba7f5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -165,13 +165,13 @@ static void full_screen_activated(GSimpleAction *action, GVariant *parameter,
app = GTK_APPLICATION(user_data);
window = GTK_WINDOW(gtk_application_get_active_window(app));
+ GdkWindow *gdk_window = gtk_widget_get_window(GTK_WIDGET(window));
+ com.is_fullscreen = gdk_window_get_state (gdk_window) & GDK_WINDOW_STATE_FULLSCREEN;
if (com.is_fullscreen) {
gtk_window_unfullscreen(window);
- com.is_fullscreen = FALSE;
} else {
gtk_window_fullscreen(window);
- com.is_fullscreen = TRUE;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment