Commit Graph

4 Commits

Author SHA1 Message Date
Colin Harrison d75195b626 hw/xwin: Align parameter names in prototypes with definition
A follow up to commits 2d9123fd, 451c5d91 and efe96a17, which changed the
parameter name in the definition from index to i, to fix shadowing index() but
didn't adjust the prototype declaration.

Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-03-03 14:31:17 +00:00
Jon TURNEY 7e07d61857 hw/xwin: Bug fixes for screen sizing when the screen window is on a non-primary monitor
There is a bug that when the -screen option is used to specify a monitor for
the screen window to be located on, but no explicit size is specified
(and the -multiplemonitors option isn't specified), the screen
window size is always constrained to fit the work area of the primary
monitor (rather than the work area of the specified monitor)

This gives incorrect results if you want a screen the same size as your
non-primary monitor (e.g. by using -screen 0 @2) and your non-primary
monitor is larger than your primary monitor.

(This can be worked around by specifying -multiplemonitors and an explicit
screen size the same size as the monitor (e.g. -multiplemonitors -screen 0
1600x1200@2))

Fix to use work area for the monitor specified for the screen, rather than the
primary monitor work area (unless -multiplemonitors is used, in which case we
continue to use the virtual desktop work area instead)

Also fix the adjustment for an autohide taskbar, so that it is only done if the
taskbar is on the same monitor as the screen (or -multiplemonitors is used)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-07-16 13:54:15 +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 46c5778853 Cygwin/X: Move QueryMonitor() out of windprocarg.c
Move QueryMonitor() out of windprocarg.c into a new file, winmonitors.c,
as we use to use it from other places as well

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-01-19 14:02:20 +00:00