Commit Graph

99 Commits

Author SHA1 Message Date
Jon TURNEY
090856b55b hw/xwin: Tidy up some pointless output which is always emitted
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-07-16 13:52:37 +01:00
Keith Packard
9838b7032e Introduce a consistent coding style
This is strictly the application of the script 'x-indent-all.sh'
from util/modular. Compared to the patch that Daniel posted in
January, I've added a few indent flags:

	-bap
	-psl
	-T PrivatePtr
	-T pmWait
	-T _XFUNCPROTOBEGIN
	-T _XFUNCPROTOEND
	-T _X_EXPORT

The typedefs were needed to make the output of sdksyms.sh match the
previous output, otherwise, the code is formatted badly enough that
sdksyms.sh generates incorrect output.

The generated code was compared with the previous version and found to
be essentially identical -- "assert" line numbers and BUILD_TIME were
the only differences found.

The comparison was done with this script:

dir1=$1
dir2=$2

for dir in $dir1 $dir2; do
	(cd $dir && find . -name '*.o' | while read file; do
		dir=`dirname $file`
		base=`basename $file .o`
		dump=$dir/$base.dump
		objdump -d $file > $dump
	done)
done

find $dir1 -name '*.dump' | while read dump; do
	otherdump=`echo $dump | sed "s;$dir1;$dir2;"`
	diff -u $dump $otherdump
done

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-21 13:54:42 -07:00
Jon TURNEY
9a709d5028 hw/xwin: Handle more motif window decoration hinting
Handle the MWM_DECOR_MINIMIZE, MWM_DECOR_MAXIMIZE and MWM_DECOR_MENU
decoration hints in a _MOTIF_WM_HINTS window property

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:40:30 +00:00
Jon TURNEY
95b1391fe3 hw/xwin: Chain IOError handlers to avoid longjmp across threads
Avoid crashes on shutdown due to the undefined behaviour of calling longjmp() on the
result of setjmp() from a different thread, by chaining IOError handlers and only
jumping back up to the frame for this thread

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-01-26 14:10:24 +00:00
Ryan Pavlik
cc7dedd6b5 hw/xwin: Fix a memory leak in error path in winInitWM()
Signed-off-by: Ryan Pavlik <rpavlik@iastate.edu>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-01-07 22:49:51 +00:00
Jon TURNEY
ce6136f8c5 Cygwin/X: Make winOverrrideStyle() thread-safe
Make winOverrrideStyle() thread-safe

winOverrideStyle() is called from the internal WM client thread.

Accessing server-internal data structures to get window name and
class is not safe, as there is no lock to ensure we do not collide
with these data structures being updated in the server thread.

Rewrite so the internal client thread uses X client calls to
obtain this data safely

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
2011-04-27 14:24:17 +01:00
Jon TURNEY
19e764eee0 Cygwin/X: Internal WM workaround for Java AWT bug
Java applications using AWT on JRE 1.6.0 break with non-reparenting WMs AWT
doesn't explicitly know about (See sun bug #6434227)

XDecoratedPeer.handleConfigureNotifyEvent() only processes non-synthetic
ConfigureNotify events to update window location if it's identified the
WM as a non-reparenting WM it knows about (compiz or lookingglass)

Rather than tell all sorts of lies to get XWM to recognize us as one of
those, simply send a synthetic ConfigureNotify for every non-synthetic one

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
2011-04-27 14:19:01 +01:00
Jon TURNEY
9952b51f68 Cygwin/X: Fix typos in comments
Fix a few typos in comments

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 15:01:51 +01:00
Colin Harrison
1ba1b12d24 Xming: Warning fix in winApplyHints()
winmultiwindowwm.c: In function ‘winApplyHints’:
winmultiwindowwm.c:1587: warning: ISO C90 forbids mixed declarations and code

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-19 14:38:32 +01:00
Jon TURNEY
9b18f7ac0b Cygwin/X: Tidy up some cosmetic issues in log strings
Tidy up some cosmetic issues in log strings:
- Add missing '\n'
- Fix some strings starting with '\n'
- Remove '\f' from some log strings

These all just look daft in a log with timestamps.

Also clarify log message about screen origin coordinates

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-03-16 13:55:20 +00:00
Jon TURNEY
7f54ccafad Cygwin/X: Make transient windows resizable again
Reverts the change which makes parented windows non-resizeable

Because this was trying to do something which we should be doing, as an alternative we
try checking WM_NORMAL_HINTS for windows which shouldn't  be resizable

If a window has a maximum size specified, no maximize box
If a window has a fixed size (max size == min size, per EWMH 1.3 Implementation Notes), no resizing frame

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05 19:21:16 +00:00
Jon TURNEY
654d2e372d Cygwin/X: Discourage other WMs in multiwindow mode
Tidying up of other WM detection code when ading SWT/Motif
fix in commit 71519a572f
was rather over-agressive and now allows other WMs to think
they can start when the internal WM is running.

Revert to the behaviour of selecting ButtonPressMask events
as well on the root window, so other WMs will be dissuaded
from starting

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05 19:21:14 +00:00
Jon TURNEY
22982b9e95 Cygwin/X: XSupportsLocale() failure is non-critical
Treat XSupportsLocale() returning false as non-critical to internal client
theads startup, and issue a warning, not an error

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-02-05 19:15:09 +00:00
Colin Harrison
bad41bdfd4 Xming: Always update the Windows title Unicode (wide-character) in -multiwindow mode.
Apply the Windows title wide-character in -multiwindow mode. Windows should now
display correct client X Window titles for locales with wide characters.

Copyright (C) Colin Harrison 2005-2008
http://www.straightrunning.com/XmingNotes/
http://sourceforge.net/projects/xming/

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-02-05 18:17:29 +00:00
Jon TURNEY
ec5417b965 Cygwin/X: Ensure WM_STATE atom exists in multiwindow mode
Workaround a bug in iiimxcf (assuming the WM_STATE atom exists),
which can cause many Solaris clients to simply fail with a BadAtom
error

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2009-11-09 20:33:51 +00:00
Jon TURNEY
0866322b57 Cygwin/X: Always use an authorization cookie for internal clients
Don't conditionalize use of an authorization cookie for internal client
threads on XCSECURITY, always use one (this avoids certain problems
with XDMCP setups where the XDMCP host removes localhost from the access
list etc.)

Conditionalize the use of a XCSECURITY authorization descriptor on XCSECURITY

Consolidate the various places where the authorization cookie is set
for internal threads into a new function, winSetAuthorization()

Use authorization cookie for multiwindow WM X message thread as well

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-11-09 20:33:44 +00:00
Colin Harrison
72f81f4e44 Xming: Make -auth option work in with -multiwindow
Use an internally generated cookie for authentication of the internal
window manager client when using the -auth option in -multiwindow mode.

Copyright (C) Colin Harrison 2005-2008
http://www.straightrunning.com/XmingNotes/
http://sourceforge.net/projects/xming/

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-11-09 20:33:42 +00:00
Jon TURNEY
062f49a8e0 Cygwin/X: Add a workaround for a SWT/Motif bug to internal window manager
SWT/Motif expects all top-level windows to get reparented, and waits until they
do. So workaround that in our internal WM by forcing a reparent event to
occur, even though we don't actually need to reparent the window to
frame it (as the frame is a native window, not an X window)

http://sourceware.org/bugzilla/show_bug.cgi?id=9848
https://bugs.eclipse.org/bugs/show_bug.cgi?id=36806

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2009-11-09 20:33:36 +00:00
Jon TURNEY
71519a572f Cygwin/X: Fix typo in g_fAnotherWMRunning and tidy up WM detection code
Tidy up code for detecting another WM is already running
Fix typo g_fAnotherWMRunnig -> g_fAnotherWMRunning
Remove some unused event mask macros

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2009-11-09 20:33:35 +00:00
Jon TURNEY
48a9d65b88 Cygwin/X: Window positioning improvements for multiwindow mode
A few tweaks to winUpdateWindowPosition():

* Don't allow window decoration to disappear off to top or left edge of the
display as a result of adjustments to add decoration for the window style

* Honour the position requested by window geometry for the client area (so
windows which save their position don't get moved by the decoration width
every time they are created) (unless we need to bump it away from top or left edges)

* Fix an issue with initial window placement being offscreen on multimonitor
systems when some monitors have negative coordinates (are to the left of or
above the primary monitor)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-07-07 15:03:43 +01:00
Colin Harrison
a49ae50370 Xming: Apply window style hints in -multiwindow mode
Remove frames from 'dock' windows and make them topmost in -multiwindow mode.
Remove frames from windows with MOTIF_WM_HINTS of no decorations in -multiwindow mode.
Apply some _NET_WM_STATE hints in -multiwindow mode.
Apply window styles overrides from .rc file
Correctly update region of shaped windows when applying styles

Copyright (C) Colin Harrison 2005-2009
http://www.straightrunning.com/XmingNotes/
http://sourceforge.net/projects/xming/
2009-07-03 11:19:38 +01:00
Jon TURNEY
65d74d9314 Cygwin/X: Fix multiwindow extwm mode to build again
Build and link with rootless extension
Update Xwin code for removal of RootlessAccelInit()
Fix Xwin code which now has a collision with the type name EventType

Based on patches from Colin Harrison, Jon Turney and Yaakov Selkowitz

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-06-29 18:00:03 +01:00
Colin Harrison
966c8fccf1 Xming: Fix some log spam
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-05-27 14:13:11 +01:00
Jon TURNEY
19b3e44ce5 Cygwin/X: Fix -Wold-style-definition warnings
Fix old-style definition warnings caused by definitions with empty
parameter lists "()", which should be "(void)" to indicate the function
takes no parameters, rather than unspecified parameters

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-02-12 12:03:55 +00:00
Colin Harrison
8428b92fcb Xming: Fix a couple of warnings
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-01-05 19:11:53 +00:00
Jon TURNEY
1556815d34 Cygwin/X: Initialize native HWND atom when built !XWIN_MULTIWINDOWEXTWM
Fix the native HWND atom identifier to be initialized correctly, when built without external WM support

This is neccessary for native window naming to work correctly in multiwindow internal WM mode.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2008-12-17 13:37:40 +00:00
Jon TURNEY
6e85a8304b Cygwin/X: build machinery fixes
The Cygwin/X build has been broken for a long time, probably since modular X
This patch fixes up configure/makefile and some general build issues (#18568)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2008-12-16 16:28:01 +00:00
Colin Harrison
86c4941727 fix an occasional crash in GetWindowName() (bug: 9798) 2007-05-09 16:55:27 +01:00
Adam Jackson
0aaac95b0d Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
Alexander Gottwald
20c15003f9 Fix crash on server shutdown 2005-07-05 18:25:44 +00:00
Alexander Gottwald
0f2c8221c9 Fix typo which broke window titles 2005-07-05 16:35:42 +00:00
Alexander Gottwald
3af77ad3e7 External windowmanagers could connect in multiwindow mode which lead to
strange results with the internal windowmanager.
2005-07-05 14:09:48 +00:00
Alexander Gottwald
508cdb5cb0 Include xwin-config.h if HAVE_XWIN_CONFIG is defined Cleanup X11 includes
handling Warning fixes
2005-07-04 22:10:43 +00:00
Alexander Gottwald
1cb18a4bad Workaround bug in pthread.h 2005-05-25 12:14:29 +00:00
Alexander Gottwald
3165236483 Fix crash with non-nullterminated strings (reported by Øyvind Harboe) 2005-01-06 13:24:57 +00:00
Alexander Gottwald
9bd1328c49 redone ddraw.h to be able to mix it with w32api style COM header files.
obj_base.h is not needed anymore. Using <objbase.h> instead.
Use Xwindows.h instead of windows.h
do not include win_ms.h
remove extra definition of sleep()
Set HOME to Documents and Settings/username if not set
Use Xming basedir instead of ProjectRoot for system.XWinrc
Fix callback functions to use wBOOL instead of BOOL
Fix compiler warnings. Added debug output.
Fix warning about undefined macro max
2004-12-05 21:24:48 +00:00
Alexander Gottwald
59ccc6465c Fixed windows.h include for cygwin.
Bugzilla #1945: Stop unnecessary reordering.
2004-11-29 12:34:55 +00:00
Alexander Gottwald
a7a07d0c71 Finally the multiwindow mode defines a default cursor 2004-11-24 16:56:03 +00:00
Alexander Gottwald
bc7493801d Fixes for building multiwindow and internalwm on mingw
Changed some debugging output
2004-11-22 14:28:25 +00:00
Alexander Gottwald
9826b83826 Bufzilla #1802, http://freedesktop.org/bugzilla/show_bug.cgi?id=1802 Added
mingw (Win32) port
2004-11-15 15:06:51 +00:00
Kensuke Matsuzaki
1aef106064 Add InternalWM mode. 2004-11-04 11:52:22 +00:00
Alexander Gottwald
d6e8b1affe Bug 777: Merge from CYGWIN branch 2004-06-21 13:19:32 +00:00
Egbert Eich
2fb5886200 Merging XORG-CURRENT into trunk 2004-04-23 19:54:30 +00:00
Egbert Eich
dae90c3af9 Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 2004-03-14 08:34:49 +00:00
Egbert Eich
867451f1ab Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 2004-03-03 12:12:50 +00:00
Egbert Eich
df0313d35b readding XFree86's cvs IDs 2004-02-26 13:36:15 +00:00
Egbert Eich
147aae87fd Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 2004-02-26 09:23:53 +00:00
Kaleb Keithley
adc7f9a4eb XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks 2003-11-25 19:29:01 +00:00
Kaleb Keithley
9508a382f8 Initial revision 2003-11-14 16:48:57 +00:00