Skip to content

Commit

Permalink
[linux] clean up unused includes (leanflutter#260)
Browse files Browse the repository at this point in the history
* [linux] clean up unused includes

- cairo is unused since leanflutter#250
- utsname and cstring are leftovers from the flutter plugin template

* [linux] change the last remaining strcmp() to g_strcmp0()

While one PR was changing strcmp()'s to g_strcmp0(), this piece of code
was added in another PR. Use the same method here as well, just for the
sake of aesthetics and consistency.
  • Loading branch information
jpnurmi authored and obiwanzenobi committed May 25, 2023
1 parent 2bd06e6 commit ce77dd5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions linux/window_manager_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

#include <flutter_linux/flutter_linux.h>
#include <gtk/gtk.h>
#include <sys/utsname.h>

#include <cairo/cairo.h>
#include <cstring>

#define WINDOW_MANAGER_PLUGIN(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), window_manager_plugin_get_type(), \
Expand Down Expand Up @@ -847,7 +843,7 @@ static void window_manager_plugin_handle_method_call(
response = grab_keyboard(self);
} else if (g_strcmp0(method, "ungrabKeyboard") == 0) {
response = ungrab_keyboard(self);
} else if (strcmp(method, "setBrightness") == 0) {
} else if (g_strcmp0(method, "setBrightness") == 0) {
response = set_brightness(self, args);
} else {
response = FL_METHOD_RESPONSE(fl_method_not_implemented_response_new());
Expand Down

0 comments on commit ce77dd5

Please sign in to comment.