diff --git a/src/makefile b/src/makefile index dc2f2f5..b6c144d 100644 --- a/src/makefile +++ b/src/makefile @@ -13,7 +13,8 @@ define mordavokne_rules this_name := mordavokne-$1 - this_cxxflags += $(shell pkg-config --cflags gdk-3.0) + # use -isystem instead of -I to prevent clang-tidy follow the includes from these locations + this_cxxflags += $(patsubst -I%,-isystem%,$(shell pkg-config --cflags gdk-3.0)) this_ldlibs += $(shell pkg-config --libs gdk-3.0) ifeq ($(os), linux) diff --git a/src/mordavokne/application.cpp b/src/mordavokne/application.cpp index 49764d8..9c25518 100644 --- a/src/mordavokne/application.cpp +++ b/src/mordavokne/application.cpp @@ -86,8 +86,12 @@ void application::hide_virtual_keyboard() noexcept { morda::real application::get_pixels_per_pp(r4::vector2 resolution, r4::vector2 screen_size_mm) { - utki::log([&](auto&o){o << "screen resolution = " << resolution << std::endl;}); - utki::log([&](auto&o){o << "physical screen size, mm = " << screen_size_mm << std::endl;}); + utki::log([&](auto& o) { + o << "screen resolution = " << resolution << std::endl; + }); + utki::log([&](auto& o) { + o << "physical screen size, mm = " << screen_size_mm << std::endl; + }); // NOTE: for ordinary desktop displays the DP size should be equal to 1 pixel. // For high density displays it should be more than one pixel, depending on diff --git a/src/mordavokne/glue/linux/glue.cxx b/src/mordavokne/glue/linux/glue.cxx index d9b7b5b..141e6e1 100644 --- a/src/mordavokne/glue/linux/glue.cxx +++ b/src/mordavokne/glue/linux/glue.cxx @@ -26,12 +26,12 @@ along with this program. If not, see . #include #include #include +#include #include #include #include #include #include -#include #ifdef MORDAVOKNE_RENDER_OPENGL # include @@ -594,7 +594,8 @@ struct window_wrapper : public utki::destructable { } } else { std::cout << "none of GLX_EXT_swap_control, GLX_MESA_swap_control GLX " - "extensions are supported" << std::endl; + "extensions are supported" + << std::endl; } // sync to ensure any errors generated are processed @@ -837,17 +838,21 @@ morda::real get_dots_per_pp(window_wrapper& ww) // utki::assert(mon, SL); // int sf = gdk_monitor_get_scale_factor(mon); - int sf = gdk_window_get_scale_factor (gdk_get_default_root_window ()); + int sf = gdk_window_get_scale_factor(gdk_get_default_root_window()); std::cout << "scale factor = " << sf << std::endl; - - int src_num = 0; // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast, cppcoreguidelines-pro-bounds-pointer-arithmetic) - r4::vector2 resolution(DisplayWidth(ww.display.display, src_num), DisplayHeight(ww.display.display, src_num)); + r4::vector2 resolution( + DisplayWidth(ww.display.display, src_num), + DisplayHeight(ww.display.display, src_num) + ); // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast, cppcoreguidelines-pro-bounds-pointer-arithmetic) - r4::vector2 screen_size_mm(DisplayWidthMM(ww.display.display, src_num), DisplayHeightMM(ww.display.display, src_num)); + r4::vector2 screen_size_mm( + DisplayWidthMM(ww.display.display, src_num), + DisplayHeightMM(ww.display.display, src_num) + ); return application::get_pixels_per_pp(resolution, screen_size_mm); } @@ -1251,6 +1256,7 @@ int main(int argc, const char** argv) { { auto c = argc; + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-const-cast) auto p = const_cast(argv); gdk_init(&c, &p); }