Commit Graph

207 Commits

Author SHA1 Message Date
Pierre Ossman
9d2da70d04 32-bit properties are always represented by a long. Using
unsigned causes us to read the wrong values on x86_64.
The length is also defined as the number of 32-bit values,
not the number of bytes.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10058 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-01-14 15:57:45 +00:00
Albrecht Schlosser
e77c0cd47c Small addition to fix for STR #2985 - see comment in source file.
Fixes a small potential of another leak.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9998 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-10-09 11:46:36 +00:00
Greg Ercolano
2082d7e197 Fixes STR# 2973: collection of Sun compiler fixes.
Applied str_2973_r9979_sun-fix-warnings-7.patch (with small mods)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9980 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-09-21 16:41:23 +00:00
Greg Ercolano
2fc6c3a39b Fixes STR #2985: prevent memory leaks with XGetWindowProperty()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9979 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-09-20 03:36:02 +00:00
Greg Ercolano
578310dd0f Fix Solaris warnings mentioned by Micha on fltk.coredev Sep 16 '13
in thread entitled "Re: STR 2636, clipboard notification".



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9977 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-09-16 12:02:40 +00:00
Pierre Ossman
1d6cc80d59 STR 2636. Add ability to get notifications whenever the
clipboard changes.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9974 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-09-11 12:54:40 +00:00
Greg Ercolano
c3a84e475f Small comment mods regarding Fl_mac.cxx -> Fl_cocoa.mm
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-04-06 16:35:05 +00:00
Greg Ercolano
8f8c52939e Fixes STR#2930:
Applying Chris's patch to fix d+d of text selections from Firefox/Thunderbird -> FLTK.
    Also applied Greg's fix for d+d of utf8 text in same use case.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9824 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-02-14 18:40:04 +00:00
Albrecht Schlosser
da9c3af38a Fixed access of protected member (STR #2903)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9750 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-12-12 17:27:23 +00:00
Manolo Gouy
9788ee6709 Fix STR #2859: after a window resize refused by the window manager, the window becomes freezed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9699 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-10-16 15:35:34 +00:00
Manolo Gouy
5e5fb530a2 Fix for STR#2877: try to load libXrandr.so.2
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9695 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-10-04 17:08:23 +00:00
Manolo Gouy
cbcf0c9312 Fixed STR #2644: support horizontal wheel movement under X11 and MSWindows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9624 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-06-21 08:52:29 +00:00
Manolo Gouy
25bfd177ef Fix STR#2855: improved detection of screen configuration changes under X11
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9600 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-06-14 08:36:43 +00:00
Fabien Costantini
36c52ce810 Fixed even more warnings in Fl_x.cxx & utf8Wrap.c
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9394 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-24 02:44:21 +00:00
Manolo Gouy
08ce2e07d3 Fix STR#2641: true fullscreen windows that cover all their screen including menu bar, task bar, dock.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9299 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-23 16:47:53 +00:00
Manolo Gouy
32d4bc4099 Fix STR#2810: removed all uses of function Fl_Device::class_name().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9293 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-18 18:48:29 +00:00
Manolo Gouy
67fdcb8fa3 Fix STR #2779: clang-detected error
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9192 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-29 14:41:33 +00:00
Manolo Gouy
23e38f1980 Exploit the HAVE_DLSYM and HAVE_DLFCN_H preprocessor variables defined by configure
to control usage of dlopen/dlsym system calls.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9128 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-04 16:56:09 +00:00
Manolo Gouy
f309c395fc STR#2600 again: under X11, dynamically load the libXrandr shared library.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9123 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-04 09:21:47 +00:00
Manolo Gouy
e3b758c6f0 Fix STR#2724: #if HAVE_XRANDR instead of #ifdef
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9115 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-01 17:33:02 +00:00
Matthias Melcher
8e95ba0700 STR 2713: less restrictive XClass handling.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9110 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-01 15:53:57 +00:00
Manolo Gouy
9bdc310346 Fix STR#2600 : screens configuration changes are now detected under all platforms.
Requires the RandR X extension.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9102 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-30 14:46:08 +00:00
Manolo Gouy
d9cda5c3aa Fix STR#2695 & 2697: correct computation of work areas with multiple screens.
This introduces 3 new functions
static void Fl::screen_work_area(X,Y,W,H)
static void Fl::screen_work_area(X,Y,W,H,mx,my)
static void Fl::screen_work_area(X,Y,W,H,screen_no)
that compute screen work areas and are used by FLTK to position menu windows.

The Fl::x(),y(),w(),h() functions are made consistent across platforms: they return
the origin/size of the work area of the main screen (as far as possible, see below).

On the Mac OS platform, all screen functions reflect changes in screen number and 
positions without requiring the application to restart.

On the X11 platform, I did not find an API to compute the main screen work area
in all conditions. What's used does compute the correct work area when there's
a single screen, but not when there are several, because it returns an area that
encompasses all screens. The implemented workaround is that Fl::x(),y(),w(),h() 
and Fl::screen_work_area(X,Y,W,H,0) return the exact work area when there's 
a single screen, and return the full screen area when there are several.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9084 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-29 16:04:24 +00:00
Greg Ercolano
4f4a8fc3c7 Modifications to all LGPL headers for STR #2685.
(to clarify static exception LGPL by changing license references)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19 04:49:30 +00:00
Manolo Gouy
1bef30d503 Fix STR #2647: crash when copying text from firefox under X11.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8764 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-30 16:47:48 +00:00
Manolo Gouy
18a902ca31 Fix Fl_Paged_Device::print_window(), Fl_Window::decorated_w() and Fl_Window::decorated_h()
when the window is iconized for all platforms.
Also, factorized some duplicated code in src/Fl_x.cxx.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8759 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-30 12:33:51 +00:00
Manolo Gouy
39998a972c Fix for STR #2648 continued: Fl_Window::decorated_w() and Fl_Window::decorated_h() are
also involved in this fix. 

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8756 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-29 18:01:17 +00:00
Manolo Gouy
84a025b174 Fix for STR #2648: when compiz is used, the window's parent is the root window, not the
title bar-containing window, so we resign printing the window decoration.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8754 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-29 17:34:57 +00:00
Manolo Gouy
493accc905 Attempt to fix STR #2648 by testing all X-API return codes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8753 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-29 16:29:09 +00:00
Manolo Gouy
e86bbe4be8 Removes a compilation warning because of use of X->xid = NULL
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8730 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-23 19:40:23 +00:00
Manolo Gouy
b3f6de1f37 Fix STR #2627: if an X11 window is externally destroyed, FLTK now reacts coherently
either deleting the corresponding FLTK window, or recreating the X11 window.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8723 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-23 16:49:02 +00:00
Manolo Gouy
2a9d1e7bec Fix STR #2638. The X11 part is simplified as suggested by Bill.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8710 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-21 21:55:59 +00:00
Albrecht Schlosser
fce1e80ee3 Fix potential crash in fl_xid() on Linux (STR #2635). This would
crash if called when a window is not shown().


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8706 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-21 10:05:19 +00:00
Manolo Gouy
0f5ea9a2e2 Fix STR #2612: added missing #include <X11/keysym.h>
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8625 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-27 08:47:00 +00:00
Albrecht Schlosser
3b76848435 Documentation updates, also fixing STR #2574, trying to make clear
which events invisible and inactive widgets can get.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8623 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-24 17:09:41 +00:00
Albrecht Schlosser
5c6913fed9 Fixed potential uninitialized pointer usage.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8620 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-23 12:27:58 +00:00
Manolo Gouy
b51f47c437 Fix STR #2605: proper mapping of the Windows key.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8603 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-18 11:45:46 +00:00
Manolo Gouy
9ff9cf1230 Added Fl_Paged_Device::print_window() to print a window with its title bar and frame.
Added Fl_Window::decorated_w() and Fl_Window::decorated_h() that return the size
of a window with its title bar and frame.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8593 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-15 21:38:05 +00:00
Albrecht Schlosser
58c94b9b33 Suppress warnings in fl_init_xim. Only the very first warning message
will be issued (STR #2578).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8478 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-26 14:14:50 +00:00
Albrecht Schlosser
d98a0fede6 Removed extraneous '\n' from Fl::warning() calls in src/Fl_x.cxx.
Note: '\n' is added in the default Fl::warning() handler function and should
not be in the format string.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8473 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-25 09:15:57 +00:00
Manolo Gouy
18156dfb30 Removed global variable fl_surface that was not very useful because equivalent
to Fl_Surface_Device::surface().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8360 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-02 12:42:47 +00:00
Manolo Gouy
bb29437427 Removed global variable fl_display_device that was not very useful because equivalent
to Fl_Display_Device::display_device().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8359 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-02 11:29:18 +00:00
Manolo Gouy
a306fe46d3 Redefined fl_xid() as an inline function when used inside the FLTK library.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8295 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-20 13:22:30 +00:00
Ian MacArthur
bf52399372 Another tweak to fl_init_xim() as proposed by Denton Thomas.
Should not change the behaviour from the previous fix, it is
just a bit tidier!



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8279 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-15 22:47:30 +00:00
Ian MacArthur
d87cc866fc This is an attempt to resolve the potential leaks identified in fl_init_xim() by
Denton Thomas.
This is not quite the patch as he proposed it, but I *think* whay I have done
is OK.
Seems to be OK for me anyway... Needs testing by others of course!



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8278 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-14 22:06:41 +00:00
Manolo Gouy
1a0b262f99 Fix memory leak in fl_new_ic() reported by Denton Thomas.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8277 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-14 11:48:18 +00:00
Manolo Gouy
77204efa1c X11 specific: made class Fl_X visible only if FL_LIBRARY is defined before compilation,
as discussed in fltk.development ("Fl_X not exported on mac in 1.3").  
Tested OK with configure+make and CMake.
At this point, the FL_X class remains to be hidden on the WIN32 platform.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8268 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-12 09:24:03 +00:00
Manolo Gouy
bc509d32eb Fix STR #2504 (first part). Replaced HAVE _CAIRO by FLTK_HAVE_CAIRO and USE_CAIRO
by FLTK_USE_CAIRO everywhere.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8198 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-06 10:24:58 +00:00
Manolo Gouy
75533d2482 Make sure not to call XFree with NULL pter.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8098 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-22 09:22:38 +00:00
Manolo Gouy
7a75f5b923 Fix STR #2474. This allows an FLTK application to be started at X startup and to respond to
X input methods even if the XIM server starts after the application.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8097 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-22 07:09:25 +00:00