FLTK logo

[fltk/fltk] Tooltip causing Window to "unfocus" on Windows (#261)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

[fltk/fltk] Tooltip causing Window to "unfocus" on Windows (#261) Webb Hinton Jul 20, 2021  
 

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 ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.