|
|
Moving fltk-rs/fltk-rs#797 to here.
Looks like the Tooltip widget is causing the app window to unfocus.
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Pack.H>
int main() {
Fl_Window win(400, 300, "Window");
Fl_Pack pack(160, 20, 80, 300);
pack.spacing(5);
for (int i = 0; i < 5; i++) {
auto btn = new Fl_Button(0, 0, 0, 40, "Button");
btn->tooltip("Button");
}
pack.end();
win.end();
win.show();
win.redraw();
return Fl::run();
}
CMakeLists.txt
cmake_minimum_required(VERSION 3.15)
project(monitors)
include(FetchContent)
set(FLTK_BUILD_TEST OFF CACHE BOOL " " FORCE)
set(OPTION_USE_GDIPLUS ON CACHE BOOL " " FORCE)
FetchContent_Declare(FLTK
GIT_REPOSITORY https://github.com/fltk/fltk
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(FLTK)
add_executable(main main.cpp)
target_link_libraries(main PRIVATE fltk gdiplus)
target_include_directories(main PRIVATE ${fltk_SOURCE_DIR} ${fltk_BINARY_DIR})
target_link_libraries(main PRIVATE fltk)
build.bat
cmake -S. -Bbin -DCMAKE_BUILD_TYPE=Release && cmake --build bin --config Release
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
[ Direct Link to Message ] | |
|
| |