Commit Graph

186 Commits

Author SHA1 Message Date
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
Manolo Gouy
97149d19a5 Better algorithm for function convert_crlf().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8009 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-11 14:59:22 +00:00
Albrecht Schlosser
1156ad5e98 Fixed buffer null termination inconsistency when removing cr's from
selection, source file indenting, and a crash if we have an empty selection.
Update for previous fix to STR #2472 (X11).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7997 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-10 12:05:01 +00:00
Manolo Gouy
e931f660ca STR #2472: X11 only: fixes DnD between FLTK and other apps for non-ASCII text.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7992 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-09 21:52:07 +00:00
Manolo Gouy
163476f665 Fix STR #2277 for crash when DnD of filename to editor.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7980 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-08 17:10:05 +00:00
Manolo Gouy
271e1d8212 Fix STR #2470. Don't call Xutf8TextPropertyToTextList if X_HAVE_UTF8_STRING isn't defined
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7970 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-07 18:25:15 +00:00
Greg Ercolano
93135e36f4 Applied patch "str-2416-erco-v1.patch" to solve STR #2416
issue with UTF8 window labels not working with xwininfo.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7929 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-12-01 08:13:27 +00:00
Manolo Gouy
a8a5e3603c Fixes STR #2277.
Many thanks for the patch.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7925 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-30 16:36:38 +00:00
Matthias Melcher
e454f97acc Fixed Copyright to 2010.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-28 21:06:39 +00:00
Matthias Melcher
57083d0222 Fixed XExpose event for soome WM's (STR #2039)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7880 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-21 15:01:58 +00:00
Matthias Melcher
bc66ca6264 Improved support for faulty X11 clients (STR #2385)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7866 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-17 11:28:58 +00:00
Matthias Melcher
e91fe6e6d5 Fixed Caps Lock handling in X11/XIM (STR #2366)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7862 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-16 21:15:27 +00:00
Albrecht Schlosser
e5ac1f7b97 Fixed X11 cut/copy problem on 64-bit systems (STR #2419)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7837 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-15 07:14:29 +00:00
Matthias Melcher
8e30c66a92 Fixed special handling for ISO back-tab keycode (STR #2369)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7779 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-10-30 19:56:20 +00:00
Matthias Melcher
291faee430 Fixed a bunch of warnings from gcc 4.4.5 . Most of these are parenthesis missing to make the precedence of && over || obvious. Ah well, why not...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7765 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-10-28 18:02:20 +00:00
Manolo Gouy
61eb9377c8 Renamed global variable from fl_device to fl_graphics_driver to better express its class
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7659 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-07-01 13:21:32 +00:00
Albrecht Schlosser
da2954b1d6 Removed an "unused variable" warning.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7642 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-06-15 08:20:15 +00:00
Albrecht Schlosser
02ef055c6c Previous commit log should read:
Fixed regressions introduced with svn -r 7617.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7641 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-06-15 08:04:50 +00:00
Albrecht Schlosser
37ef57934f Fixed regressions introduced with svn -r 7627.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7640 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-06-15 07:49:26 +00:00
Manolo Gouy
26049351e0 Better device hierarchy with surfaces and graphics drivers.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7617 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-05-27 17:20:18 +00:00
Manolo Gouy
d0b1cc30f7 Removed multiple inheritance: back to r. 7519 exactly.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7522 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-18 06:57:37 +00:00
Manolo Gouy
913530758a Improved the hierarchy of Fl_Device subclasses to allow separation of platform-specific devices.
This introduces multiple inheritance.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7520 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-16 20:19:09 +00:00