summaryrefslogtreecommitdiff
path: root/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
AgeCommit message (Collapse)Author
2021-06-26Fix a potential memory leak (PR #241)Albrecht Schlosser
This is a hypothetical fix, since the condition `count == 0` may not be true although `doit` has been allocated. In practice this should not be possible since the same loop is executed twice in lines 463++ and 471++. But anyway, here it is...
2021-06-26Fix potential memory leak (#241)fire-eggs
Signed-off-by: Albrecht Schlosser <albrechts.fltk@online.de>
2021-02-16Use <config.h> when appropriate.ManoloFLTK
2021-02-13Remove compilation warnings issued by Visual Studio 2019.ManoloFLTK
2021-02-01Scaling support under Windows: fix fullscreen window mode.ManoloFLTK
When scale was > 1, fullscreen window did not cover the task bar, as seen with test/fullscreen.
2020-07-06Remove $Id$ tags, update URL's, and moreAlbrecht Schlosser
- remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers.
2020-06-15Allow using an Fl_SVG_Image object as window icon.ManoloFLTK
Fix for issue #90: Setting an svg image as a window icon causes a segfault.
2020-01-15Fix uninitialized vars in calls to fl_clip_box() (issue #6)Albrecht Schlosser
The main fixes are only to avoid static code analyzer warnings reported in issue #5, but there are also minor bug fixes included. These bug fixes are more of theoretical concerns though. Close #6.
2019-02-23Rename member todelete_ of struct Fl_Window_Driver::shape_data_type to ↵ManoloFLTK
effective_bitmap_
2019-02-23New member function const Fl_Image* Fl_Window::shape() replaces int ↵ManoloFLTK
Fl_Window::is_shaped() The new function allows to get the window's shaping image and delete it after use, if appropriate.
2018-05-12Remove public member function Fl_Window_Driver *Fl_Window::driver() so class ↵Manolo Gouy
Fl_Window_Driver is not in FLTK public API. This function is replaced by static Fl_Window_Driver* Fl_Window_Driver::(const Fl_Window *win). The purpose is to have class Fl_Window_Driver outside from FLTK ABI. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12915 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-24Windows: avoid changing the current Fl_Surface_Device when drawing an ↵Manolo Gouy
Fl_Double_Window. This change was previously attempted at r.12792 but the test/offscreen demo did not run well with it. This commit fixes the problem: the global fl_window should not be changed when drawing to an Fl_Double_Window. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12868 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-23Undo change at r12792 (24 march 2018) because test/offscreen does not work ↵Manolo Gouy
with it. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12867 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-24Windows: avoid changing the current Fl_Surface_Device when drawing an ↵Manolo Gouy
Fl_Double_Window. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12792 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-03-09Windows: remove necessity to compile with -DFLTK_HIDPI_SUPPORT to make WIN32 ↵Manolo Gouy
FLTK apps DPI-aware. At this point, Windows FLTK apps detect HighDPI displays and rescale their GUI accordingly. They also all reply to ctrl/+/-/0/ keystrokes to enlarge/shrink/reset their windows. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12723 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-31Replace FL/x.H with FL/platform.H - step 2 (STR #3435).Albrecht Schlosser
This second step replaces FL/x.H with FL/platform.H in all source files. Dependencies have been adjusted as well. This commit completes the replacement of FL/x.H with FL/platform.H. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12641 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-18STR#3444: Add MacOS support for application rescaling (not quite complete)Manolo Gouy
With this, most MacOS FLTK app can be scaled with command/+/-/0/ keystrokes. A scaling problem remains, visible in test/cube, where the "Test" string is not positioned correctly. GLUT apps can also be scaled (across platforms). SVG images are re-rasterized after app scaling for optimal drawing. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12594 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-20Remove undesirable statement.Manolo Gouy
A bug was visible in test/unittests when moving between lines and rectangles. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12394 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-26X11 platform, resize window when moved across screens: remove hide()/show() ↵Manolo Gouy
calls. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12355 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-25Remove virtual Fl_Window_Driver::reuse_icons() no longer useful after r.12349.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12351 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07Define Fl_WinAPI_Screen_Driver::DWM_scaling_factor() only without ↵Manolo Gouy
FLTK_HIDPI_SUPPORT. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12298 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-07Fix Fl_WinAPI_Window_Driver::border_width_title_bar_height() when built ↵Manolo Gouy
without FLTK_HIDPI_SUPPORT git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12296 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-04HiDPI support under WIN32: fix fullscreen when several monitors of distinct ↵Manolo Gouy
resolution. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12288 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-04Slight improvement of Fl_WinAPI_Window_Driver::border_width_title_bar_height()Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12287 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-03HiDPI support under WIN32 platform: completed.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12285 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-29HiDPI support for WIN32 platform: begin to support screen-specific scale factor.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12280 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-28Better implementation of Fl_WinAPI_Window_Driver::reuse_cursor() that will ↵Manolo Gouy
also work with custom cursors. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12277 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-28HiDPI support: keep window's icons after rescalingManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12276 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-28HiDPI support: keep window's cursor after rescaling.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12275 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-27WIN32 platform: more progress for full HiDPI supportManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12273 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-19HiDPI support under WIN32: fix bugs with tile demo and with fullscreen demo.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12268 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-19HiDPI support under WIN32: fix fullscreen mode when scaling factor is > 1.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12267 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-19HiDPI support under WIN32 platform: fix ↵Manolo Gouy
Fl_WinAPI_Window_Driver::capture_titlebar_and_borders() under XP. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12266 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-06-18Advancing HiDPI support for the WIN32 platform - still incomplete.Manolo Gouy
It's still necessary to compile with -DFLTK_HIDPI_SUPPORT to activate the new HiDPI support. Default builds get the same HiDPI support as in FLTK 1.3 git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12265 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-05-17Introduce HiDPI + rescaling support for the X11 platform (+ partial support ↵Manolo Gouy
for WIN32) Corresponds to STR #3320 1) HiDPI support consists in detecting the adequate scaling factor for the screen on which FLTK maps a window, and scaling all FLTK units by this factor. FLTK tries to detect the correct value of this factor at startup (see more details below). Environment variable FLTK_SCALING_FACTOR can also be used to set this value. 2) Rescaling support consists in changing the scaling factor of all FLTK windows in reply to ctrl/+/-/0/ keystrokes. More details for the various platforms : - X11: Support is very advanced. Some details need still to be improved. Automatic detection of the correct starting value of the scaling factor works well with the gnome desktop. The present code contains no support for this on other desktops. FLTK_SCALING_FACTOR provides a workaround. -WIN32: Support is incomplete at this point, although many test applications have partial or complete HiDPI and scaling support. The current value of the system's scaling factor is correctly detected at application startup. Apps respond to changes of this value in real time. Support needs to define the FLTK_HIDPI_SUPPORT preprocessor variable at compile time. This way, standard builds produce a code with the default WIN32 HiDPI support, that is, where all graphics goes to an internal buffer that gets enlarged by the system and then mapped to the HiDPI display. To experiment with (or develop) the new HiDPI support requires a modified build procedure in which FLTK_HIDPI_SUPPORT is defined at compile time. When the support will be complete, the requirement for the definition of this preprocessor variable will be removed. The present commit contains support for a single scaling factor. Eventually, per-screen scaling factors should be implemented, as done for X11. - MacOS: this commit does not give new HiDPI for this platform. Eventually, window rescaling in reply to command/+/-/0/ is desirable. Per-screen scaling factor makes no sense on this platform because the OS itself takes care of the difference between the resolutions of traditional and retina displays. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12239 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-29Avoid compilation warnings with -Wmaybe-uninitializedManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11993 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-27Fix Fl_Copy_Surface under Windows 10 when the desktop scaling factor value ↵Manolo Gouy
is > 100 % git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11899 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-27Fix Fl_WinAPI_Window_Driver::border_width_title_bar_height() for displays ↵Manolo Gouy
where true DPI is not 96. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11895 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-25Fix computation of Fl_Window::decorated_w() and decorated_h() when apps are ↵Manolo Gouy
resized through display setting. Under Windows 10: when the user sets the value of "Change the size of text, apps and other items" in display settings to above 100 %, the computation of Fl_Window::decorated_w() and decorated_h() has to take the scaling factor into account. This factor is also necessary to draw correctly window title bars. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11893 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-19Move private_dc from Fl_X for WIN32 platform to Fl_WinAPI_Window_Driver.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11664 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-19Move Fl_X::make_fullscreen() for WIN32 platform to Fl_WinAPI_Window_Driver:: ↵Manolo Gouy
make_fullscreen(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11660 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-19Transform Fl_X::make(Fl_Window*) for WIN32 platform into virtual Fl_X* ↵Manolo Gouy
Fl_Window_Driver::makeWindow(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11659 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-18Move other_xid member variable from class Fl_X to class F_Window_Driver.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11654 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-18Move wait_for_expose member variable from class Fl_X to class Fl_Window_Driver.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11653 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-17MSWindows fixes for previous commits.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11644 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-16 Continue removing non window-related member-functions from class Fl_X.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11633 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-16 Continue removing non window-related member-functions from class Fl_X.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11632 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-06Fix Doxygen warnings.Albrecht Schlosser
There was one obvious warning in src/fl_read_image.cxx, but others have to do with incomplete code and platform specific definitions. I'm not entirely happy with these changes. Temporary changes have been marked with 'FIXME' and should be removed later if possible. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11547 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-04-03Rewrite fl_scroll_area.cxx under the driver model.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11520 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-03-30Rewrite functions XRectangleRegion(), XDestroyRegion() under the driver model.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11479 ea41ed52-d2ee-0310-a9c1-e6b18d33e121