summaryrefslogtreecommitdiff
path: root/gdk/win32
Commit message (Collapse)AuthorAgeFilesLines
* win32: Fix buildAlexander Larsson2013-02-181-1/+0
| | | | | | gdkwindown-win32.c included windows.h directly rather than via gdkwin32.h which broke the build for me at least. Instead rely on it being included in gdkwin32.h and things work right.
* Reimplement _NET_WM_SYNC_REQUEST inside X11 backendOwen W. Taylor2013-02-141-14/+0
| | | | | | | | Deprecate gdk_window_enable_synchronized_configure() and gdk_window_configure_done() and make them no-ops. Implement the handling of _NET_WM_SYNC_REQUEST in terms of the frame cycle - we know that all processing will be finished in the next frame cycle after the ConfigureNotify is received.
* Move single-include guards inside include guardsMatthias Clasen2012-12-287-21/+21
| | | | | | gcc has optimizations for include guards that only work if they are outermost in the the header. https://bugzilla.gnome.org/show_bug.cgi?id=689810
* Fix broken function pointer declarations on windowsAlan McGovern2012-11-291-2/+3
| | | | | | | | | | Both flashing a window and setting the window opacity were using incorrect declarations for function pointers. They were missing the WINAPI annotation as defined in windows.h. As a result, the stack could be corrupted when these functions were invoked. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=689235 (cherry picked from commit 5637ef1f97ee46666c97707ed7f6bae459007163)
* gdk: Don't use GDK_THREADS_ENTER/LEAVE macros internallyMatthias Clasen2012-07-301-6/+6
| | | | | | These are just wrappers for the functions, and we want to deprecate them. Stopping to use them internally is a good first step.
* Fix windres invocationРуслан Ижбулатов2012-06-192-2/+2
| | | | Signed-off-by: Chun-wei Fan <fanchunwei@src.gnome.org>
* win32: Fix up wintab supportAlexander Larsson2012-04-0310-398/+779
| | | | | | | | | | We now have a proper MASTER/SLAVE input device split, where the masters are virtual core input devices and we add fake hw slave devices for the system pointer and real slave devices for wintab devices. We also set the proper source_device on the events so you can tell which device sent it and properly decode the axis info.
* win32: Ensure we update GDK_WINDOW_STATE_FOCUSEDAlexander Larsson2012-03-161-0/+5
| | | | | When windows get activated/inactivated we need to update STATE_FOCUSED. Without this the backdrop theme state will not work.
* win32: Finish making query_state() vfunc a void vfuncKalev Lember2012-03-101-14/+9
| | | | | Commit 114b45c converted all the backends but missed a few details in gdkdevice-win32. This fixes it up.
* gdk: Make query_state() vfunc a void vfuncBenjamin Otte2012-03-092-14/+12
| | | | | | | ... and make sure the backends implement it that way. query_state() return value was ignored in all of GDK and caused crashes when it failed.
* win32: Remove some unused input stuff to make win32 build againAlexander Larsson2012-03-066-110/+17
| | | | Input events doesn't quite seem to work though, so it needs some fixing.
* Change FSF AddressJavier Jardón2012-02-2734-102/+34
|
* GdkScreen: fix precondition checks in the public APIMichael Natterer2012-02-211-15/+14
| | | | | | Move g_return_if_fail() stuff from the backends to the public functions in gdkscreen.c itself, and some fixes for ugly formatting in the various gdkscreen-backend.c files.
* win32: fix gdk_win32_window_raiseDieter Verfaillie2012-01-251-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | When calling gtk_window_present(), gdk_win32_window_raise did not actually raise the window anymore. Replacing BringWindowToTop() with SetForegroundWindow() fixes this. During testing, we also discovered that sometimes SetForeGroundWindow() will (correctly) refuse to raise the window and fail(for example: sometimes when dragging a different application at the time of a gtk_window_present() call). To prevent a GdkWarning from being produced, usage of the API_CALL macro has been removed for this case. Additional goodies of SetForeGroundWindow: - it brings the window to the front when the process owning the window to raise is the foreground process (for example when gtk_window_present is called from a GtkStatusIcon's activate signal handler) - it limits itself to flashing the task bar button associated with the window if the process owning the window to raise is *not* the foreground process (for example when gtk_window_present is called from a g_timeout_add callback function) https://bugzilla.gnome.org/show_bug.cgi?id=665760
* Add gdk_screen_get_monitor_workareaMatthias Clasen2011-12-181-1/+2
| | | | | | | | | | | | The function returns the part of a monitors area that should be used for positioning popups, menus, etc. The only non-trivial implementation atm is in the X backend, all the other backends just return the full monitor area. The X implementation is currently suboptimal, since it requires roundtrips to collect the necessary information. It should be changed to monitor the properties for changes, when XFixes allows to monitor individual properties. https://bugzilla.gnome.org/show_bug.cgi?id=641999
* win32: Make all GDK_WINDOW_TEMP always on topAlexander Larsson2011-11-251-8/+10
| | | | | This makes menus, popups and tooltips show above the windows task bar.
* win32: Don't double free stuff when finalizing drag contextAlexander Larsson2011-11-211-8/+0
| | | | | We were freeing stuff that was already freed in the parent class finalizer.
* win32: Don't dereference keyboard_grab if it is NULLAlexander Larsson2011-11-211-1/+2
| | | | This fixes a crash in e.g. testdnd
* win32: Make gdk_drag_context_new staticAlexander Larsson2011-11-211-1/+1
|
* win32: get rid of GdkDragContextPrivateWin32 and related machinery.Dieter Verfaillie2011-11-211-127/+118
| | | | | | | | | | | | | | | This turns GdkWin32DragContext into a proper GdkDragContext subclass. Because we now correctly initialize GdkWin32DragContext in gdk_drag_context_new, we no longer crash immediatly when a DnD operation is initialized (the find_window, drag_status, ... vfuncs where all pointing to 0x0 instead of their proper win32 implementations). We now try to consistently refer to GdkDragContext as "context", GdkWin32DragContext as "win32_context" and the ole2 related target_drag_context and source_drag_context as "ctx". Members of GdkWin32DragContext only used by the ole2 DnD codepaths are now explicitly marked with a ole2_dnd_ prefix.
* win32: make fixup_event correctly ref all GdkWindow membersAlexander Larsson2011-11-171-0/+8
| | | | This fixes some crashes related to owner changes and selections.
* win32: Make grab cursors work againAlexander Larsson2011-11-103-59/+46
|
* win32: Fix gdk_win32_window_translateAlexander Larsson2011-11-101-8/+58
| | | | | | We now do proper handling of existing invalid regions, and we use ScrollDC which allows us to specify the right clip region rather than just the bounding rect.
* win32: fix pasting screenshots taken with PrintScreen or Alt+PrintScreenDieter Verfaillie2011-11-101-0/+11
| | | | | | | | | | | | These are found on the clipboard in the biCompression == BI_BITFIELDS && biBitCount >= 16 format. In this case the BITMAPINFOHEADER is followed by three DWORD specifying the masks of the red green and blue components, but bfOffBits was not being adjusted accordingly. Based on Massimo's comment on bug 631384 and verified on http://msdn.microsoft.com/en-us/library/dd183386%28v=VS.85%29.aspx https://bugzilla.gnome.org/show_bug.cgi?id=631384
* win32: fix some typosDieter Verfaillie2011-11-101-3/+3
|
* win32: Fix some warningsAlexander Larsson2011-11-105-5/+7
|
* win32: Ensure newly mapped toplevels are inside the workareaAlexander Larsson2011-11-101-0/+51
| | | | | This is what e.g. metacity does, and its needed to e.g. get the inital position of the gimp dock window right.
* win32: Fix placement at initial positionAlexander Larsson2011-11-101-6/+31
| | | | | | | | | | | | Positioning windows at 0,0 post creation failed, because it was mapped with CW_USEDFAULT, but private->x/y still said 0, so moving it to 0,0 did nothing. We now always position the window at the right place, even when not mapped, but we create it at CW_USEDEFAULT initially and store that position before moving it to the right place. This fixes the window sizing test in testgtk and the inital position for the gimp toolbar.
* win32: Fix synaptics trackpad issuesAlexander Larsson2011-11-101-7/+60
| | | | | | | | | | | | | | | The synaptics trackpad driver has some weird behaviour on scroll. It pops up a window over the mouse pointer (looking like a scrollbar). This has two problems: * We get extra enter/leave events for the trackpad window * We get back the trackpad window when we look for the window under the mouse to deliver the mousewheel message. So, we add some trackpad specific hacks to avoid this (sigh) based on the trackpad window window class. This fixes bug #542777 and was partially based on a patch there from Peter Clifton.
* win32: Add gdk_win32_window_get_impl_hwndAlexander Larsson2011-11-102-0/+9
| | | | | This is needed to fix the ms-windows theme not to create native windows for all child windows.
* win32: Fix modal_hint handlingAlexander Larsson2011-11-103-30/+32
| | | | | | | Modal hints are not really a stack. All windows that are modal are allowed to get input, not just the top one. This fixes bug #604156
* win32: Don't use API_CALL for SetWindowLongAlexander Larsson2011-11-101-3/+3
| | | | | This can return 0 without it being an error. Should fix the last issue with bug #142874
* win32: Make flush/sync work like in XAlexander Larsson2011-11-103-15/+10
| | | | | | | | | | gdk_flush() should gdk_display_sync() on all open displays. Both for display_flush and display_sync it seems useful to call GdiFlush, but we don't have anything extra to do for display_sync, as there is no inherent roundtrip on win32. This should close bug #84314
* win32: Add custom placements for some window typesAlexander Larsson2011-11-102-2/+90
| | | | | | | | | Windows with transients: center on parent Splash screens: center on monitor Also properly ignores initial moves of unmapped windows that are not override redirect or HINT_POS Fixes bugs #324254 and #612359
* win32: More robust way to ensure we get a configure event after move/resizeAlexander Larsson2011-11-103-42/+21
| | | | | | | | | | | There were still cases where we didn't get a WINDOWPOSCHANGED after a SetWindowPos() call, like e.g. with a larger minimum size than the set size (bug #574935) So, we revert the previous fix and now just always manually emit a configure notify after the move_resize call. Also, we inhibit the WINDOWPOSCHANGED configure event during the move_resize operation to avoid multiple Configures.
* win32: Ensure we always send a configure event when changing size/posAlexander Larsson2011-11-103-9/+50
| | | | | | | | | | | | | There are some cases where we don't get a WINDOWPOSCHANGE such that we generate a configure event, even if we called gdk_window_move_resize() or similar. For instance: * The window is fullscreen * The window is maximized * The specified pos/size is the same as the current one However, as per X11 ConfigureNotify semantics we *always* want one, or we could run into issue like e.g. bug #537296 where we're waiting for the CONFIGURE to call gdk_window_thaw_toplevel_updates_libgtk_only().
* win32: By default, allow windows larger than the screenAlexander Larsson2011-11-101-0/+3
|
* win32: Fix size or style changes during fullscreenAlexander Larsson2011-11-101-12/+19
| | | | | | | When we're fullscreen we should update the cached hints, and we should not apply the normal hints to the style. This fixes bug #516822
* win32: Use WM_NCDESTROY instead of WM_DESTROYAlexander Larsson2011-11-101-1/+1
| | | | | WM_NCDESTROY gets called after children are destroyed, which is the semantics DestroyNotify has in X11.
* win32: Don't remove the window from the handle table on destroyAlexander Larsson2011-11-101-2/+0
| | | | | | | | | We always get the WM_DESTROY message anyway, and we remove it there. Bug #336416 even claims this could be a leak if the WM_DESTROY message was not seen before the DestroyWindow call returned, as the WM_DESTROY message could not be handled later without the window in the handle table. I'm not sure this can happen, but we might as well remove it.
* win32: Make set_keep_above work also for non-mapped windowsAlexander Larsson2011-11-101-21/+21
| | | | This fixes bug #171456
* win32: Send window-state-changes before configure eventsAlexander Larsson2011-11-102-33/+35
| | | | | | | This is requires to that the state of the window is right when you get the configure event (and to match what X does). Fixes bug #169811
* win32: Send initial configureAlexander Larsson2011-11-101-2/+3
| | | | We need to send a configure event when a window is shown.
* win32: Ignore client requested window move/size during SIZEMOVEAlexander Larsson2011-11-104-2/+19
| | | | | This will just be fighting the user like in e.g. https://bugzilla.gnome.org/show_bug.cgi?id=64428
* win32: Remove most special casing of WINPOSCHANGED during modal opsAlexander Larsson2011-11-101-117/+86
| | | | | | | | | | | There is no particular reason to special case this, we want to handle all sort of normal events. The only special thing we keep is that as an optimization we pump the message loop extra during a WINPOSCHANGED in a modal operation as that will cause us to repaint faster. Also, bump the arbitrary number of mainloop iterations for the timer. I don't see why we need it at all, but at least doing more than one iteration if needed should be nice.
* win32: Fix missed resize exit messageAlexander Larsson2011-11-101-1/+10
| | | | | | When you start a window resize or move via the window menu and don't actually change anything we're not getting an exitsizemove. In order to work around this we also look for WM_CAPTURECHANGED.
* win32: Handle all window changes in WINDOWPOSCHANGEDAlexander Larsson2011-11-101-169/+138
| | | | | | This moves all the code from WM_SIZE, WM_MOVE, and WM_SHOWWINDOW into one place, cleans up the code and makes sure we only send a single configure event even if both size and position changes.
* win32: Fix up window_showAlexander Larsson2011-11-101-55/+15
| | | | | | | We don't pass in raise anymore, but already_mapped. Also, already_mapped must be used rather than MAPPED, as we already synthesize the MAPPED in the generic code (and thus we don't have to synthesize it again).
* win32: Call GetQueueStatus instead of PeekMessage PM_NOREMOVEDieter Verfaillie2011-11-101-6/+3
| | | | | | | | | Calling PeekMessage can cause reentrant calls into the window procedure for sent (as opposed to posted) messages, so its not safe to call when we're not expecting reentrancy. Instead we call GetQueueStatus when we're just looking for availible messages. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=552041
* win32: Better crossing events and grab destination reportingAlexander Larsson2011-11-101-76/+314
| | | | | We new report to the right window during !owner_event grabs, and we send proper enter and leave events.