summaryrefslogtreecommitdiff
path: root/hw/xwin/winwindow.h
AgeCommit message (Collapse)AuthorFilesLines
2013-07-23hw/xwin: Improve WM_ENDSESSION handling using separate messaging window threadJon TURNEY1-0/+1
Currently, WM_ENDSESSION just calls GiveUp() to set the DE_TERMINATE flag. But for the X server to exit cleanly, we also need the X server dispatch loop to be unblocked so it can notice that DE_TERMINATE has been set and exit, removing it's lock file and any unix domain socket. It appears that the system will terminate the process when the last UI thread in that process returns from processing WM_ENDSESSION for the last top-level window. Since WM_ENDSESSION appears to sent by the system via SendMessage() (synchronously) and the wndproc is called to process it in the message thread for that window (the X server thread), we can't easily terminate the X server dispatch loop from inside the WM_ENDSESSION message processing. So, create a messaging window, a hidden, top-level window, with a separate thread to catch this message, and process it by calling GiveUp() and then blocking on a mutex until the X server dispatch loop exits. Also, notice when this is a shutdown cancel WM_ENDSESSION message and take no action. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2013-01-16hw/xwin: Add a new WM_WM_HINTS_EVENT event to update window styleJon TURNEY1-0/+1
Add a new WM_WM_HINTS_EVENT event to update window style if any of the properties which affect window style change Check PropertyNotify events for any of the window properties which we consider to decide on the window style, and update the window style by sending a WM_WM_HINTS_EVENT message to the WM. This allows the styling of the window to change during it's lifetime. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-11-27hw/xwin: Add a simple interface to the ITaskbarList COM interfaceJon TURNEY1-0/+3
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-11-27hw/xwin: Add correct taskbar grouping of X windows on Windows 7Tobias Häußler1-0/+9
I created a small patch for XWin that adds correct grouping of taskbar icons when 'Always combine, hide labels' is set in the taskbar properties. It uses the new taskbar APIs introduced in Windows 7 to set an application id for each window. The id is based on the X11 class hints. v2: Add file to _SOURCES to fix distcheck v3 : Fix compilation with mingw-w64 w32api headers Include propkey.h, propsys.h rather than defining necessary stuff ourselves v4: Fix up names taskbar->propertystore, AppID->AppUserModelID, etc. Link directly with ole32 for PropVariantClear(), prototyping it if neccessary. v5: Put winSetAppUserModelID()-related code in a separate file. Drop a superfluous assign to hr of ignored HRESULT of SetValue() Signed-off-by: Tobias Häußler <tobias.haeussler@gmx.de> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-11-05hw/xwin: Remove pointless winFinishCreateWindowsWindowDDNL()Jon TURNEY1-9/+0
Remove pointless winFinishCreateWindowsWindowDDNL() and the useless DirectDraw surface pointers in the window privates Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-08-03hw/xwin: Make winOverrideIcon() thread-safe for icon data accessJon TURNEY1-13/+0
winOverrideIcon() is called from the internal WM client thread. Accessing server-internal data structures to get icon data or window hints 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 We used to also set the icon inside the server when the window was initially created. For simplicity, we simply send a message to the internal WM to update the icon when the window is created (rather than writing different icon update code which can work in the server thread for that one case...) extwm mode used to do the icon update in the server. I'm not sure that actually made much sense. Let's assume the external WM client can do it instead... v2 Make sure that WM_WM_ICON_EVENT does nothing for override-redirect windows v3 Reinstate check that native window actually has expected properties for an X window before trying to update it's icon; some auxiliary windows owned by the XWin process don't, which would cause a crash v4 Various fixes to pixmap icon conversion: - remove left-over malloc in winScaleXimageToWindowsIcon causing a memory leak - don't recalculate DDBitmap stride in winScaleXimageToWindowsIcon, when we already have worked it out - properly check that XGetWindowProperty(NET_WM_ICON) returned some data - don't try to retrieve WM_HINTS icon_mask if it isn't set - restore accidentally dropped calculation of effBpp, stride, maskStride of output DDBitmap - make sure imageMask is zero-initalized before we use it to mask the DDBitmap v5 Remove a left-over unused variable v6 Avoid XDestroyImage(NULL) crash if XGetImage failed for icon_pixmap Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-08-03hw/xwin: Rename WM_WM_HINTS_EVENT to WM_WM_ICON_EVENTJon TURNEY1-1/+1
WM_WM_HINTS_EVENT only updates the icon, so rename it to WM_WM_ICON_EVENT Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-03-21Introduce a consistent coding styleKeith Packard1-44/+40
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-01-26hw/xwin: Handle more motif window decoration hintingJon TURNEY1-4/+7
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>
2011-07-07hw/xwin: Add a flag to track which windows have been drawn to using WGL.Jon TURNEY1-0/+3
Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2011-06-29Cygwin/X: Preserve client area size and position on Windows window style changeJon TURNEY1-0/+1
When the style changes, adjust the window size so the client area remains the same. Otherwise the window size may change when sizing is reflected from Windows to X, and some windows are drawn expecting them to be exactly the requested size (e.g. the gmplayer control window) Use DeferWindowPos to delay the resize to preserve client area on WM_STYLECHANGING until after the style change has actually happened in WM_STYLECHANGED As a consquence of this, we need to be more careful to create windows with exactly the requested placement and client area initially, so the client area matches what the X client requested Also synchronize the X windows idea of the placement of a window which Windows is allowed to place 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>
2010-02-05Cygwin/X: Update DDX specific -help textJon TURNEY1-0/+1
Alphabetize options Review option descriptions, clarify and bring up to date Add missing option descriptions Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2009-07-03Xming: Apply window style hints in -multiwindow modeColin Harrison1-0/+20
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-01-19Xming: Correct the way display and screen number is reported in window ↵Colin Harrison1-2/+2
titles and tooltips Correct the tooltip text for the toolbar X icon to be strictly correct, 'display-number:screen' should be ':display-number.screen'. Also for the default window title. Adjust the style of the Windows title in XDMCP mode from 'Xming - hostname' to 'hostname:display-number.screen'. 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>
2006-07-21Remove RCS tags. Fix Xprint makefile braindamage.Adam Jackson1-1/+0
2005-07-05External windowmanagers could connect in multiwindow mode which lead toAlexander Gottwald1-1/+2
strange results with the internal windowmanager.
2005-01-06ImakefileAlexander Gottwald1-3/+6
InitOutput.c XWin.rc winerror.c wintrayicon.c winvideo.c Set PROJECT_NAME in Imakefile to create alternative window titles for Cygwin/X and Xming
2004-11-15Bufzilla #1802, http://freedesktop.org/bugzilla/show_bug.cgi?id=1802 AddedAlexander Gottwald1-1/+3
mingw (Win32) port
2004-11-04Add InternalWM mode.Kensuke Matsuzaki1-4/+6
2004-06-21Bug 777: Merge from CYGWIN branchAlexander Gottwald1-19/+27
2004-04-23Merging XORG-CURRENT into trunkEgbert Eich1-6/+6
2004-03-14Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004xf86-4_4_99_1Egbert Eich1-1/+1
2004-03-03Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004xf86-4_4_0Egbert Eich1-1/+1
2004-02-26readding XFree86's cvs IDsxf86-4_3_99_903Egbert Eich1-1/+1
2004-02-26Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004Egbert Eich1-1/+1
2003-11-25XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_16Kaleb Keithley1-21/+38
2003-11-14Initial revisionKaleb Keithley1-0/+118