Commit Graph

385 Commits

Author SHA1 Message Date
Руслан Ижбулатов
ae35951a73 Fix display/screen/displaymanager init interdependency
https://bugzilla.gnome.org/show_bug.cgi?id=700444
2013-06-11 11:16:03 +02:00
Alexander Larsson
8306d26714 GdkWindow: Track all native windows of native windows
We keep a list of all native children of a native window. This means
we don't have to recurse over the entire hierarchy to find any
native children.
2013-05-15 11:08:35 +02:00
Alexander Larsson
19560bf0d4 gdkwindow: Remove translate vfunc
This is not used anymore
2013-05-07 16:33:00 +02:00
Alexander Larsson
1884271f03 win32: Report ScrollDC update region directly
Rather than set the window update region and repaint this region
when we get a WM_PAINT we just directly add it to the update
region. No need to roundtrip via win32.

This lets us also make sure we do this drawing in the same update
cycle. This seems especially important on Win7, because ScrollDC
seems to act kind of weird there, not using bitblt in areas where
it seemingly could, which makes scrolling look really flashy.

http://bugzilla.gnome.org/show_bug-cgi?id=674051
2013-04-11 12:12:35 +02:00
Alexander Larsson
38ada3b61b win32: Fix build
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.
2013-02-18 11:20:40 +01:00
Owen W. Taylor
645b5f398d Reimplement _NET_WM_SYNC_REQUEST inside X11 backend
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.
2013-02-14 17:19:51 -05:00
Alan McGovern
149de71624 Fix broken function pointer declarations on windows
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 5637ef1f97)
2012-11-29 15:07:42 +01:00
Alexander Larsson
7430559736 win32: Remove some unused input stuff to make win32 build again
Input events doesn't quite seem to work though, so it needs some fixing.
2012-03-06 12:04:36 +01:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Dieter Verfaillie
fe1907708c win32: fix gdk_win32_window_raise
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
2012-01-25 20:32:50 +01:00
Alexander Larsson
62b505174f win32: Make all GDK_WINDOW_TEMP always on top
This makes menus, popups and tooltips show above the windows
task bar.
2011-11-25 11:22:59 +01:00
Alexander Larsson
2f14732b1d win32: Fix gdk_win32_window_translate
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.
2011-11-10 17:41:13 +01:00
Alexander Larsson
52be8cb9e9 win32: Fix some warnings 2011-11-10 17:41:11 +01:00
Alexander Larsson
65002208b9 win32: Ensure newly mapped toplevels are inside the workarea
This is what e.g. metacity does, and its needed to e.g. get the inital
position of the gimp dock window right.
2011-11-10 17:41:10 +01:00
Alexander Larsson
c563765574 win32: Fix placement at initial position
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.
2011-11-10 17:41:10 +01:00
Alexander Larsson
487ace0aca win32: Add gdk_win32_window_get_impl_hwnd
This is needed to fix the ms-windows theme not to create
native windows for all child windows.
2011-11-10 17:41:08 +01:00
Alexander Larsson
1737ffeeb9 win32: Fix modal_hint handling
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
2011-11-10 17:41:07 +01:00
Alexander Larsson
2788efeb5e win32: Don't use API_CALL for SetWindowLong
This can return 0 without it being an error.
Should fix the last issue with bug #142874
2011-11-10 17:41:07 +01:00
Alexander Larsson
d27b402a85 win32: Add custom placements for some window types
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
2011-11-10 17:41:06 +01:00
Alexander Larsson
2662fe37df win32: More robust way to ensure we get a configure event after move/resize
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.
2011-11-10 17:41:05 +01:00
Alexander Larsson
2dbc05f756 win32: Ensure we always send a configure event when changing size/pos
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().
2011-11-10 17:41:04 +01:00
Alexander Larsson
6be876cdea win32: Fix size or style changes during fullscreen
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
2011-11-10 17:41:03 +01:00
Alexander Larsson
4690aa28d0 win32: Don't remove the window from the handle table on destroy
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.
2011-11-10 17:41:02 +01:00
Alexander Larsson
725379192d win32: Make set_keep_above work also for non-mapped windows
This fixes bug #171456
2011-11-10 17:41:01 +01:00
Alexander Larsson
ab615105b6 win32: Send window-state-changes before configure events
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
2011-11-10 17:41:01 +01:00
Alexander Larsson
36a28d616f win32: Ignore client requested window move/size during SIZEMOVE
This will just be fighting the user like in e.g.
https://bugzilla.gnome.org/show_bug.cgi?id=64428
2011-11-10 17:41:00 +01:00
Alexander Larsson
66f7e5d163 win32: Fix up window_show
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).
2011-11-10 17:40:57 +01:00
Alexander Larsson
73c527aef0 win32: Record the native event mask in use 2011-11-10 17:40:54 +01:00
Peter Clifton
f9d8f9758b Win32: Ensure native back-end for windows where the user requests their handle
https://bugzilla.gnome.org/show_bug.cgi?id=658841
2011-11-10 17:40:49 +01:00
Matthias Clasen
32884e9c16 win32: Adapt to GdkWindowImpl api change 2011-11-05 01:11:18 -04:00
Alexander Larsson
a3b2840cae Remove support for GDK_NATIVE_WINDOWS
GDK_NATIVE_WINDOWS was a way to keep some old apps running that did weird
things in gtk2. We should not have to carry this forwards in gtk 3.x.

We do however keep a g_warning() call reminding people of this fact to
ease debugging when they try to port their applications.

https://bugzilla.gnome.org/show_bug.cgi?id=644119
2011-03-08 23:13:39 +01:00
Hans Breuer
b41ee31a16 win32: no more GdkNativeWindow and related changes
- replace GdkNativeWindow with HWND, remove type casts
 - no more GdkDisplayClass::get_drag_protocol but GdkWindowImpl::get_drag_protocol
 - remove *_client_message*()
2011-02-06 15:07:13 +01:00
Hans Breuer
1d838f586c win32: gdk3 resurrection
There are sure regressions but basic stuff seems to be working
again after all the API breakage done with comments like
"Win32 and Quartz need to be ported still."
2011-01-02 13:33:04 +01:00
Benjamin Otte
3036922b3d gdk: Create windows via _gdk_display_create_window()
THe use of this function will become visible in the next commits. But
wrapping g_object_new() is a generally a good idea anyway.
2010-12-21 12:07:08 -05:00
Matthias Clasen
2650328ea8 Add win32 implementation for foreign window functions 2010-12-21 12:07:04 -05:00
Matthias Clasen
9a1cc81acb Add a vfunc to replace _gdk_windowing_window_destroy_foreign
All backends updated.
2010-12-21 12:06:57 -05:00
Matthias Clasen
1e694b4dd8 Add a vfunc for gdk_window_set_composited 2010-12-21 12:06:57 -05:00
Matthias Clasen
de84a7b14f Move gdk_window_lookup to common code 2010-12-21 12:06:55 -05:00
Benjamin Otte
d55073fde6 gdk: Remove depth argument from GdkWindowImpl->get_geometry() 2010-12-06 01:02:52 +01:00
Benjamin Otte
4d1604c77d gdk: Move window beeps into GdkWindowImpl
One less magic function. Also refactored it to make it easier to
implement. It now returns TRUE if it beeped and FALSE if it failed to do
so. A default implementation exists that just returns FALSE for all the
backends that can't beep windows (read: everything but X11 with XKB -
and why on earth do keyboard libs implement beeping?)
2010-12-02 20:21:05 +01:00
Benjamin Otte
1269f8424f gdk: Make get_shape and get_input_shape vfuncs
Trying to get rid of all the _gdk_windowing_something() functions that
we expect backends to magically know about and instead put them in a
proper interface (mostly GdkWindowImplClass).
2010-12-02 20:21:04 +01:00
Benjamin Otte
17a0a467a1 gdk: Pass the GdkWindow to resize_cairo_surface vfunc
So it's in sync with all the other vfuncs.
2010-12-02 20:21:04 +01:00
Benjamin Otte
370d272b13 gdk: Remove _gdk_window_impl_get_type() function
It was only used in the backends, and they can use the correct type
directly.
2010-12-02 20:21:03 +01:00
Benjamin Otte
62622a94ae gdk: Pass Drawable as argument
We're not passing a GdKWindow here, but the implementation.
2010-12-02 20:21:02 +01:00
Kristian Rietveld
eca2af5230 Make set_cairo_surface_size a vfunc on GdkWindowImpl
Note the special implementation of this method on GdkOffscreenWindow
that makes sure its current surface is not destroyed.
2010-10-05 15:38:23 +02:00
Benjamin Otte
04d5c477aa API: Remove gdk_drawable_get_colormap()
And with it, remove any notion of colormaps from GdkWindow. In
particular, X11 windows will now not set attrs.colormap when calling
XCreateWindow.
2010-09-26 15:11:33 +02:00
Benjamin Otte
f08254074c API: Remove colormap member from GdkWindowAttr
Also remove all code that cares about differing colormaps for child
windows.
2010-09-26 15:11:33 +02:00
Benjamin Otte
a6e936788a gdk: gdk_drawable_get_screen/visual => gdk_window_get_screen/visual 2010-09-26 15:11:33 +02:00
Benjamin Otte
eee6c002d1 gdk: store the visual in the GdkWindowObject 2010-09-26 15:11:32 +02:00
Benjamin Otte
894d402c0f API: Remove gdk_drawable_set_colormap() 2010-09-26 15:11:32 +02:00
Benjamin Otte
2c1633699f gdk: Rewrite background handling
Now the window background is a cairo_pattern_t. The backends will try to
set this as good as they can on the windowing system, but no guarantees
are made on wether the windowing system supports the pattern.

Also gets rid of GDK_NO_BG as undefined behavior is not a good idea to
support, and GDK_NO_BG effectively made the window's contents undefined.
It wasn't effectively used in GTK anyway.
2010-09-26 15:03:00 +02:00
Benjamin Otte
bfa6ad6e7c gdk: Remove _gdk_windowing_get_shape_for_mask()
It's unused. And there's a replacement available with
gdk_cairo_region_create_from_surface()
2010-09-26 15:02:59 +02:00
Benjamin Otte
6ef27387e0 API: remove gdk_window_set_icon()
gdk_window_set_icon_list() now does everything gdk_window_set_icon()
used to do.
2010-09-26 15:02:59 +02:00
Javier Jardón
bd277fad50 Remove deprecated gdk_window_get_deskrelative_origin() and its implementations 2010-09-09 00:50:46 +02:00
Tor Lillqvist
87bf99dcc5 Fix Win32 build 2010-08-29 12:40:56 +03:00
Matthias Clasen
eb10e6b128 Remove the long deprecated GDK_WINDOW_DIALOG type.
This has been deprecated forever, and was just left in for
compatibility reasons.
2010-08-28 20:10:02 -04:00
Tor Lillqvist
56f71f0123 Fix Win32 build
Builds now, except for the ms-windows theme engine. It doesn't really
work, though.
2010-08-23 18:55:54 +03:00
Benjamin Otte
ef2d37cdaf API: remove begin/end_direct_draw functions
They're not needed without GdkGCs.

FIXME: This breaks the win32 XP theme. Someone gotta fix it.
2010-08-10 21:02:29 +02:00
Benjamin Otte
65ac54bb23 gdk: Make window moves a custom vfunc
The window move code needs special attention for multiple reasons:
- invalid areas for expose events need to be modified
- self-copy is not supported by Cairo
- in X11, copying from an overlapped Window might cause unexposed areas
  to be copied in, spo expose events for those need to be generated.

This was all special cased in various parts of the code. By making it an
explicit vfunc, we can work around it.
2010-08-10 21:02:28 +02:00
Tor Lillqvist
34e8bd9dba Fix build breakage on Windows caused by the region changes
Patches by Sam Thursfield, from bug #623476.
2010-07-05 12:57:13 +03:00
Benjamin Otte
300e6b84cd s/GdkRegion/cairo_region_t/ in all of gtk
https://bugzilla.gnome.org/show_bug.cgi?id=613284
2010-06-29 16:06:38 +02:00
Martin Schlemmer
213994b565 win32: Avoid type warning for offscreen windows in xp theme
See bug #598299
2010-06-14 20:57:22 +02:00
Martin Schlemmer
4696e94138 win32: Fix the xp there to correctly clip when drawing
This makes the xp theme work again, and also enables it.
2010-06-11 20:20:07 +02:00
Matthias Clasen
bd4609b140 Merge the xi2-for-master branch 2010-05-25 18:38:44 -04:00
Javier Jardón
2b64a7fd54 Remove some deprecated stuff from GdkWindow
Also, substitute the deprecated functions with the correct ones
2010-05-12 04:29:55 +02:00
Tor Lillqvist
eb21a7df29 Work on OLE2-based generic DND
Intermediate commit of work in progress on integrating the old code
for OLE2-based generic drag and drop from Arhaeopteryx Software, from
a long time ago in the GTK+ 1.3 timeframe. Does still not work and is
as before not compiled in unless OLE2_DND is defined in
gdkdnd-win32.c. (Thus, for inter-process DND, still only WM_DROPFILES
style dropping of files on GTK+ apps works.)

Related slight refactoring of other code that shouldn't change how it
works. Add more global variables for run-time constants (once
initialized) representing well-known GdkAtoms and registered Windows
clipboard formats, as they with the generic DND code will be needed in
several source files. Some improved debugging output.
2009-12-16 13:10:21 +02:00
Nicola Fontana
1e1131c959 Do not use static GTypeInfo and GInterfaceInfo
Either g_type_register_static_simple (used by G_DEFINE_TYPE_EXTENDED)
and G_IMPLEMENT_INTERFACE use automatic variables for GTypeInfo and
GInterfaceInfo structs, while tutorials and source code often use
static variables. This commit consistently adopts the former method.

https://bugzilla.gnome.org/show_bug.cgi?id=600158
2009-11-06 01:21:09 +01:00
Tor Lillqvist
ab13c00a38 Use correct size for root window with multiple monitors
The root window width and height have already been correctly
initialised in _gdk_root_window_size_init() to cover all monitors, so
don't incorrectly re-initialise using GetSystemMetrics(SM_C[XY]SCREEN)
which only gives the size of the primary monitor anyway. (See MSDN.)

This fixes at least gdk_screen_get_{width,height}() which indirectly
affects at least the positioning of combo box pop-up menus on multiple
monitors.
2009-10-18 14:35:17 +03:00
Tor Lillqvist
77590e9af7 Add missing newline to debugging output 2009-10-18 14:19:24 +03:00
Tor Lillqvist
be5c06d799 Delete unused leftover static function 2009-10-18 12:08:18 +03:00
Tor Lillqvist
f545bd270d More meaningful debugging output in gdk_win32_window_get_root_coords 2009-10-18 12:06:29 +03:00
Tor Lillqvist
d8de422794 Remove unused variables and static functions 2009-10-18 11:51:57 +03:00
Tor Lillqvist
b92f882ec4 Correct function names in debugging output 2009-10-18 11:45:03 +03:00
Alexander Larsson
5ebb32d1ff Extend _gdk_windowing_window_at_pointer to be able to get toplevels only
This has two advantages:
1) In many backends, this is faster as we can terminate the window
hierarchy traversal earlier
2) When used in gdkdisplay.c::get_current_toplevel() to get the
current toplevel that has the pointer we now correctly return
a toplevel with the pointer in it where the pointer is inside
some foreign subwindow of a toplevel window.

The second advantage fixes some bugs in client side event generation
when the pointer is inside such a foreign child window.
2009-09-28 15:21:54 +02:00
Alexander Larsson
d67a7eda16 Add gdk_window_restack
This lets you restack a window above or below a specified sibling.
At least eclipse wants this functionallity.
2009-09-02 23:38:55 +02:00
Alexander Larsson
cc5b22cc81 Don't update window->shaped from backends
This is properly updated from the main code these days and
should not be touched by the backend code.
2009-08-31 15:06:01 +02:00
Tor Lillqvist
341b8a4752 Initialize missing methods on Windows
Set the input_window_destroy and input_window_crossing methods of the
GdkWindowImplIface on Windows. Add implementation of
_gdk_input_crossing_event that is mostly dummy, though.
2009-08-13 22:49:35 +03:00
Alexander Larsson
939e55223c Ensure that queue_translation is paired with the right X operation
The X11 queue_translation operation uses NextRequest to get the serial
of the XCopyArea operation where the translation should end. However,
if the gc passed to gdk_draw_drawable has a non-flushed clip region
(which it commonly has now for the window clipping) then the next
operation will be the GC flush, not the XCopyArea.

To handle this right we now pass in the GC to be used to
queue_translation and ensure that it is flushed before calling
NextRequest().
2009-08-13 14:46:02 +02:00
Hans Breuer
c5c87a918f Some cursor work for csw(win32), more left to do 2009-07-26 19:14:06 +02:00
Hans Breuer
4d2c165b75 Formatting and removing commented/obsolete code 2009-07-26 19:14:04 +02:00
Alexander Larsson
aa8693f2cb Track viewable for GdkWindow 2009-07-18 23:11:54 +02:00
Hans Breuer
d0cf137ed9 More efficient version of _gdk_win32_window_queue_translation()
Don't create create an extraneous expose event for any scroll operation
that gtk+ does. Thanks to Alex for the hint.
2009-07-17 17:26:48 +02:00
Hans Breuer
e7737dbd19 Implement _gdk_win32_window_destroy() and more cleanup
Implement _gdk_win32_window_destroy() by just renaming
_gdk_windowing_window_destroy(), removed superfuous stub.

Also cleaned up implementations of  gdk_win32_window_set_background()
and gdk_win32_window_set_back_pixmap() - removed stuff now done at the
respective gdk_window_*() function.
2009-07-13 09:45:07 +02:00
Hans Breuer
e96c161643 Implement _gdk_win32_window_queue_translation() 2009-07-13 09:45:06 +02:00
Hans Breuer
b72960f12d Bug #588388 - shape rendering is back
Just mapping exisiting implementations to new GdkWindow API.

http://bugzilla.gnome.org/show_bug.cgi?id=588388
2009-07-13 09:45:05 +02:00
Hans Breuer
7e116727d7 Fix condition to deliver root coords 2009-07-04 12:19:12 +02:00
Hans Breuer
23b1b350b0 Enable window creation with GDK_WINDOW_CHILD again 2009-07-04 12:19:11 +02:00
Alexander Larsson
b1df568239 Some win32 cleanups 2009-07-01 12:06:57 +02:00
Alexander Larsson
5341efd4d4 Make win32 backend build and minimally work 2009-07-01 10:28:06 +02:00
Cody Russell
f4331caf83 grabs 2009-04-02 10:16:30 +02:00
Cody Russell
49a0ec6e95 Updates 2009-04-02 10:16:30 +02:00
Cody Russell
08961c4def Get width/height from GetSystemMetrics() 2009-04-02 10:16:30 +02:00
Cody Russell
3fdd1333b2 Misc stuff 2009-04-02 10:16:29 +02:00
Cody Russell
a93c6cd6e1 CSW Win32 work in progress - builds but does not work yet. 2009-04-02 10:16:29 +02:00
Tor Lillqvist
c103cbec8a Bug 557266 - Window Management Problem
2008-10-21  Tor Lillqvist  <tml@novell.com>

	Bug 557266 - Window Management Problem

	Also reported in mail to gtk-list, and of course it has been well
	known in general that window state management is messy and buggy
	in various ways in gdk/win32.

	* gdk/win32/gdkwindow-win32.c (show_window_internal): Correct
	handling of GDK_WINDOW_STATE_ABOVE windows. It doesn't work to set
	the WS_EX_TOPMOST extended style bit using SetWindowLong(). We
	must call SetWindowPos() on the window using HWND_TOPMOST
	instead. The description for WS_EX_TOPMOST in the documentation
	for CreateWindowEx() even implies that if you read it carefully.


svn path=/trunk/; revision=21694
2008-10-21 20:31:05 +00:00
Tor Lillqvist
55d7d50e13 Bug 132501 - Make utility window translate to tool window in win32
2008-10-04  Tor Lillqvist  <tml@novell.com>

	Bug 132501 - Make utility window translate to tool window in win32

	Implement the utility window type hint. Such windows are kept on
	top of other windows. Makes GIMP's toolbox and dock windows behave
	more like in GNOME under metacity. Apply the same logic also to
	windows marked with the dialog window type hint, and windows that
	are transient for some other window. I'll call such windows
	"transient-type" below.

	* gdk/win32/gdkevents-win32.c (doesnt_want_key): Drop unused
	variables.

	(ensure_stacking_on_unminimize)
	(ensure_stacking_on_window_pos_changing)
	(ensure_stacking_on_activate_app): New functions to implement the
	desired stacking order. Make sure that a window that is not
	transient-type stays below any transient-type windows of the
	application. When activating a non-transient-type window make sure
	it rises as high as possible.

	(gdk_event_translate): Call above functions on
	WM_WINDOWPOSCHANGING, WM_ACTIVATEAPP and on WM_SIZE when
	unminimizing. Improve debugging printout.

	* gdk/win32/gdkwindow-win32.c (get_effective_window_decorations):
	Handle utility windows like toolbar windows.

	(gdk_window_new_internal) (update_style_bits): Give utility
	windows the WS_EX_TOOLWINDOW extended style.

	(gdk_window_set_title): If debugging "misc" or "events", make the
	handle of top-level windows show up in their title bars. Very
	useful when looking at debugging output.

	(gdk_window_set_keep_above) (gdk_window_set_keep_below)
	(gdk_window_set_modal_hint) (gdk_window_set_skip_taskbar_hint)
	(gdk_window_set_skip_pager_hint): Add and improve debugging
	printout.

	(gdk_window_set_type_hint): Print hint symbolically in GDK_NOTE().

2008-10-04  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkmain-win32.c (_gdk_win32_window_exstyle_to_string)
	(_gdk_win32_window_pos_bits_to_string): New debugging printout
	functions. Decode the WS_EX_* and SWP_* bits.

	* gdk/win32/gdkprivate-win32.h: Declare them. Define
	GDK_DEBUG_MISC_OR_EVENTS for use in GDK_NOTE() to match either
	"misc" or "events".


svn path=/trunk/; revision=21587
2008-10-05 00:00:10 +00:00
Cody Russell
7e8ebe06f7 Bug 553917 – Typo in gdkwindow-win32.c
2008-09-26  Cody Russell  <bratsche@gnome.org>

        Bug 553917 – Typo in gdkwindow-win32.c

        * gdk/win32/gdkwindow-win32.c: Fixed a typo in 
        update_system_menu().  Changed GDK_DECOR_ALL to GDK_FUNC_ALL.

        Reported by Richard Hult


svn path=/trunk/; revision=21522
2008-09-26 16:47:58 +00:00
Cody Russell
1c146ec11f Check if the window's state has GDK_WINDOW_STATE_MAXIMIZED set before
2008-08-27  Cody Russell  <bratsche@gnome.org>

        * gdk/win32/gdkevents-win32.c:
        * gdk/win32/gdkwindow-win32.c (show_window_recurse): Check if
        the window's state has GDK_WINDOW_STATE_MAXIMIZED set before
        calling ShowWindow (), and show using SW_SHOWMAXIMIZED or     
        SW_RESTORE accordingly.  This fixes an issue where maximized 
        windows that are iconified do not restore back to maximized 
        when you click the taskbar. (#528975)


svn path=/trunk/; revision=21218
2008-08-28 02:42:23 +00:00
Matthias Clasen
8f59f3adbb Return FALSE from reparent implementations to avoid #548993. Patch by Ed
2008-08-27  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkwindow-x11.c:
        * gdk/win32/gdkwindow-win32.c: Return FALSE from reparent
        implementations to avoid #548993. Patch by Ed Catmur.


svn path=/trunk/; revision=21215
2008-08-28 00:32:17 +00:00
Tor Lillqvist
d6ab77ea70 Bug 544684 - Win64 issue, window handles are assumed to be 32-bit
2008-08-05  Tor Lillqvist  <tml@novell.com>

	Bug 544684 - Win64 issue, window handles are assumed to be 32-bit

	* gdk/win32/gdkcursor-win32.c
	* gdk/win32/xcursors.h: Change some gchar* to guchar* and vice
	versa to avoid gcc 4.4 signedness warnings.

	* gdk/win32/gdkevents-win32.c: Add some guchar and char pointer
	casts to get rid of gcc 4.4 signedness warnings. Print GdkAtom
	values in debugging output using the %p format.
	
	* gdk/win32/gdkkeys-win32.c
	* gdk/win32/gdkfont-win32.c
	* gdk/win32/gdkmain-win32.c: Add some casts to avoid gcc warnings.
 
	* gdk/win32/gdkwindow-win32.c: Use SetWindowLongPtr() instead of
	SetWindowLong().

	* gdk/win32/gdkwin32id.c (gdk_handle_hash): Use all 64 bits of a
	HANDLE on Win64.


svn path=/trunk/; revision=20994
2008-08-04 23:21:36 +00:00
Cody Russell
6301e71979 Bug 541964 – [Win32] Setting modal hint to current value might confuse
2008-07-07  Cody Russell  <bratsche@gnome.org>

        Bug 541964 – [Win32] Setting modal hint to current value might confuse the stack

        * gdk/win32/gdkwindow-win32.c: Check if	the value is the same as the
        existing modal hint value before setting it.


svn path=/trunk/; revision=20809
2008-07-07 22:26:35 +00:00
Tor Lillqvist
d698b1f6fd Need to initialise private->impl here, too.
2008-07-07  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c
	(gdk_window_foreign_new_for_display): Need to initialise
	private->impl here, too.


svn path=/trunk/; revision=20805
2008-07-07 09:28:40 +00:00
Cody Russell
e7b024c6b7 Bug 541305 – [Win32] Scrolling was broken after GdkWindow refactoring
2008-07-02  Cody Russell  <bratsche@gnome.org>

        Bug 541305 – [Win32] Scrolling was broken after GdkWindow refactoring

        * gdk/win32/gdkwindow-win32.c:	Reverted	some logic so that scrolling
	works again.

        * gdk/win32/gdkgeometry-win32.c: Removed some more unnecessary	checks.
        * gdk/win32/gdkkeys-win32.c: Removed unused variable to fix compile-time
        warnings.


svn path=/trunk/; revision=20737
2008-07-02 20:22:30 +00:00
Cody Russell
2bb97a7a90 Bug 541249 – [Win32] Fix some internal static methods
2008-07-02  Cody Russell  <bratsche@gnome.org>

        Bug 541249 – [Win32] Fix some internal static methods

        * gdk/gdkwindow-win32.c: Make the interface implementation methods
        static.


svn path=/trunk/; revision=20734
2008-07-02 13:58:28 +00:00
Cody Russell
e625b41a1d Bug 541162 – [Win32] Update for the new GdkWindowImpl stuff
2008-07-02  Cody Russell  <bratsche@gnome.org>

        Bug 541162 – [Win32] Update for the new GdkWindowImpl stuff

        * gdk/win32/gdkprivate-win32.h:
        * gdk/win32/gdkgeometry-win32.c:
        * gdk/win32/gdkevents-win32.c:
        * gdk/win32/gdkwindow-win32.c: Update Win32 backend according to
        the newly refactored GdkWindow code.


svn path=/trunk/; revision=20729
2008-07-02 06:06:29 +00:00
Johan Dahlin
d97cdbdf53 Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch and Tim


svn path=/trunk/; revision=20669
2008-06-22 14:28:52 +00:00
Tor Lillqvist
a8b5f3ee6b Add gdk_window_redirect_to_drawable and gdk_window_remove_redirection.
2008-05-23  Tor Lillqvist  <tml@novell.com>

	* gdk/gdk.symbols: Add gdk_window_redirect_to_drawable and
	gdk_window_remove_redirection.

	* gdk/win32/gdkwindow-win32.c (_gdk_window_new)
	(_gdk_window_reparent): Rename to adapt to the offscreen rendering
	changes. Remove now unnecessary parameter checks as the caller
	does that already.

	* gtk/gtk.symbols: Add gtk_widget_get_snapshot.


svn path=/trunk/; revision=20130
2008-05-23 18:46:40 +00:00
Tor Lillqvist
5b8f0faa94 Don't do anything if style doesn't change. Improve debugging output.
2008-05-23  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (update_style_bits): Don't do
	anything if style doesn't change. Improve debugging output.


svn path=/trunk/; revision=20129
2008-05-23 18:25:12 +00:00
Tor Lillqvist
0f7099e308 Bug 520286 - Non-deletable window has no minimize / maximize buttons
2008-03-10  Tor Lillqvist  <tml@novell.com>

	Bug 520286 - Non-deletable window has no minimize / maximize buttons

	* gdk/win32/gdkmain-win32.c (_gdk_win32_window_style_to_string):
	New debugging output function that decodes a set of WS_* bits.

	* gdk/win32/gdkprivate-win32.h: Declare it.

	* gdk/win32/gdkwindow-win32.c (update_single_system_menu_entry):
	New function that enables or disables one menu entry in the system
	menu of a top-level window. (The corresponding decoration will
	then also be enabled or disabled (grayed).)

	(update_style_bits): Do as the comment says and don't try to
	update the window style based on the GdkWMFunctions set for the
	window.
		   
	(update_system_menu): New function that enables or disables the
	system menu entries based on a window's stored set of
	GdkWMFunctions.

	(gdk_window_set_functions): Call update_system_menu() instead of
	update_style_bits().


svn path=/trunk/; revision=19743
2008-03-10 15:48:06 +00:00
Cody Russell
e97c716a21 gdk/win32/gdkevents-win32.c Fixed two declarations in the middle of a
2008-02-07  Cody Russell  <bratsche@gnome.org>

        * gdk/win32/gdkevents-win32.c
        * gdk/win32/gdkwindow-win32.c: Fixed two declarations in the middle
        of a block that were causing compile problems on old
        compilers. (#515053, reported by Kazuki IWAMOTO)


svn path=/trunk/; revision=19493
2008-02-07 19:25:07 +00:00
Cody Russell
275760cd0c Walk down the stack until we get to a window that is mapped. Otherwise
2008-02-05  Cody Russell  <bratsche@gnome.org>

        * gdk/win32/gdkwindow-win32.c (_gdk_modal_current): Walk
        down the stack until we get to a window that is mapped.
        Otherwise hiding a window will cause all windows in the app
        to be blocked. (#514643)


svn path=/trunk/; revision=19477
2008-02-05 23:46:35 +00:00
Cody Russell
db58254c5c gdk/win32/gdkprivate-win32.h gdk/win32/gdkevents-win32.c
2008-02-05  Cody Russell  <bratsche@gnome.org>

        * gdk/win32/gdkprivate-win32.h
        * gdk/win32/gdkevents-win32.c
        * gdk/win32/gdkwindow-win32.c
        * gdk/win32/gdkwindow-win32.h
        * gdk/win32/gdkwin32.h:
        Modal window rework.  (#455627 and #511111)


svn path=/trunk/; revision=19463
2008-02-05 16:47:24 +00:00
Michael Natterer
8243e3d415 gdk/gdkdisplay.h gdk/gdkdrawable.h gdk/gdkevents.h gdk/gdkpango.h
2008-01-15  Michael Natterer  <mitch@imendio.com>

	* gdk/gdkdisplay.h
	* gdk/gdkdrawable.h
	* gdk/gdkevents.h
	* gdk/gdkpango.h
	* gdk/gdkregion.h
	* gdk/gdkrgb.h
	* gdk/gdkwindow.h: made more struct pointer and array parameters
	const. GDK should now be constified as far as possible without
	breaking source compatibility. Includes some minor cleanup like
	indentation and s/nfoo/n_foo/ (bug #508544).

	* gdk/gdkdisplay.c
	* gdk/gdkdraw.c
	* gdk/gdkevents.c
	* gdk/gdkpango.c
	* gdk/gdkregion-generic.c
	* gdk/gdkrgb.c
	* gdk/directfb/gdkdisplay-directfb.c
	* gdk/directfb/gdkwindow-directfb.c
	* gdk/quartz/gdkdisplay-quartz.c
	* gdk/quartz/gdkwindow-quartz.c
	* gdk/win32/gdkdisplay-win32.c
	* gdk/win32/gdkwindow-win32.c
	* gdk/x11/gdkdisplay-x11.c
	* gdk/x11/gdkwindow-x11.c: changed accordingly.


svn path=/trunk/; revision=19372
2008-01-15 15:32:37 +00:00
Michael Natterer
92f86e0496 gdk/gdk.h gdk/gdkcairo.h gdk/gdkcolor.h gdk/gdkgc.h gdk/gdkinternals.h
2008-01-14  Michael Natterer  <mitch@imendio.com>

	* gdk/gdk.h
	* gdk/gdkcairo.h
	* gdk/gdkcolor.h
	* gdk/gdkgc.h
	* gdk/gdkinternals.h
	* gdk/gdkregion.h
	* gdk/gdkwindow.h: made GdkRectangle*, GdkRegion* and GdkColor*
	parameters const.

	* gdk/gdkcairo.c
	* gdk/gdkgc.c
	* gdk/gdkwindow.c
	* gdk/gdkrectangle.c
	* gdk/gdkpolyreg-generic.c
	* gdk/gdkregion-generic.c
	* gdk/directfb/gdkcolor-directfb.c
	* gdk/directfb/gdkgc-directfb.c
	* gdk/directfb/gdkgeometry-directfb.c
	* gdk/directfb/gdkwindow-directfb.c
	* gdk/quartz/gdkcolor-quartz.c
	* gdk/quartz/gdkgc-quartz.c
	* gdk/quartz/gdkgeometry-quartz.c
	* gdk/quartz/gdkwindow-quartz.c
	* gdk/win32/gdkcolor-win32.c
	* gdk/win32/gdkgc-win32.c
	* gdk/win32/gdkgeometry-win32.c
	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkwindow-win32.c
	* gdk/x11/gdkcolor-x11.c
	* gdk/x11/gdkgc-x11.c
	* gdk/x11/gdkgeometry-x11.c
	* gdk/x11/gdkmain-x11.c
	* gdk/x11/gdkprivate-x11.h
	* gdk/x11/gdkwindow-x11.c: changed accordingly.

	* gdk/gdkpolyreg-generic.c: uncruftify to have proper function
	headers.


svn path=/trunk/; revision=19365
2008-01-14 14:02:12 +00:00
Tor Lillqvist
8dab0b9360 gdk/win32/gdkdisplay-win32.c gdk/win32/gdkglobals-win32.c
2008-01-10  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c
	* gdk/win32/gdkglobals-win32.c
	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkscreen-win32.c
	* gdk/win32/gdkwindow-win32.c: Implement
	gdk_screen_get_monitor_width_mm(), gdk_screen_get_monitor_height_mm()
	and gdk_screen_get_monitor_plug_name(). Thanks to Kazuki
	Iwamoto. (#505753)


svn path=/trunk/; revision=19346
2008-01-10 21:40:48 +00:00
Cody Russell
4dc47ed700 Properly ref/unref windows and parents. (#506769)
2008-01-10  Cody Russell  <bratsche@gnome.org>

        * gdk/win32/gdkwindow-win32.c: (gdk_window_set_transient_for),
        Properly ref/unref windows and parents.  (#506769)


svn path=/trunk/; revision=19344
2008-01-10 20:58:40 +00:00
Tor Lillqvist
19209e3a15 Use the monitor the window currently is on, not always the primary
2007-11-26  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_fullscreen): Use the
	monitor the window currently is on, not always the primary
	monitor. (#463865, Tim Evans)


svn path=/trunk/; revision=19047
2007-11-25 22:59:50 +00:00
Cody Russell
21d3d60f48 gdk/win32/gdkevents-win32.c Force non-modal transient dialogs to iconify
2007-10-17  Cody Russell  <cody@jhu.edu>

        * gdk/win32/gdkevents-win32.c
        * gdk/win32/gdkwindow-win32.[ch]: Force non-modal transient dialogs
        to iconify with their parents on Win32.  Maintain a list of transient
        children, and whenever a window is hidden or restored we now do the
        same thing to all connected transient windows above and below the
        current window in the chain.  See comment under WM_ACTIVATE for the
        reasons why.  (#164537, #371036, #405178)


svn path=/trunk/; revision=18929
2007-10-18 00:31:22 +00:00
Cody Russell
e992008541 gdk/win32/gdkevents-win32.c Fix transient windows on Win32 so that when a
2007-07-12  Cody Russell  <bratsche@gnome.org>

	* gdk/win32/gdkevents-win32.c
	* gdk/win32/gdkwindow-win32.[ch]: Fix transient windows on Win32 
	so that when a transient child window is closed (particularly when 
	there are 3 or more levels of transient windows), the correct window
	receives focus rather than a seemingly random window. (#112404) 


svn path=/trunk/; revision=18461
2007-07-12 23:38:30 +00:00
Hans Breuer
49fc7e15ee updated explicit usage of RegisterClassExW to match the WNDCLASSEXW. True
2007-06-15  Hans Breuer <hans@breuer.org>

	* gtk/makefile.msc.in tests/makefile.msc : updated
	* gdk/win32/gdkwindow-win32.c : explicit usage of RegisterClassExW
	to match the WNDCLASSEXW. 
	True dynamic linking of SetLayeredWindowAttributes
	* tests/testprint.c tests/testnouiprint.c : use G_PI


svn path=/trunk/; revision=18140
2007-06-15 15:25:50 +00:00
Tor Lillqvist
eb1876f305 Use g_win32_get_windows_version() instead of _winver so that this compiles
2007-06-14  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (RegisterGdkClass): Use
	g_win32_get_windows_version() instead of _winver so that this
	compiles on Cygwin, too. Not that I know if it makes sense to
	build GTK+ with the Win32 backend for Cygwin, but some people want
	to.


svn path=/trunk/; revision=18132
2007-06-14 09:41:08 +00:00
Matthias Clasen
885ba04648 Add support for composited child windows. (#412882, Ryan Lortie)
2007-06-01  Matthias Clasen  <mclasen@redhat.com>

        Add support for composited child windows.  (#412882, Ryan Lortie)

        * gdk/gdk.symbols:
        * gdk/gdkdisplay.h:
        * gdk/gdkinternals.h:
        * gdk/gdkwindow.[hc]: Add gdk_display_supports_composite() and
        gdk_window_set_composited().

        * gdk/x11/gdkevents-x11.c:
        * gdk/x11/gdkdisplay-x11.[hc]:
        * gdk/x11/gdkwindow-x11.[hc]: X11 implementation.

        * gdk/win32/gdkdisplay-win32.c:
        * gdk/win32/gdkwindow-win32.c: Dummy win32 implementration.

        * gdk/quartz/gdkdisplay-quartz.c:
        * gdk/quartz/gdkwindow-quartz.c: Dummy Quartz implementation.

        * gdk/directfb/gdkdisplay-directfb.c:
        * gdk/directfb/gdkwindow-directfb.c: Dummy DirectFB implementation.

        * tests/testgtk.c: Add a "composited window" test.


svn path=/trunk/; revision=18004
2007-06-01 12:16:12 +00:00
Cody Russell
c75e9c1df7 Clear correct area
svn path=/trunk/; revision=17737
2007-04-30 15:29:16 +00:00
Tor Lillqvist
b18f044270 Add functionality to set overall opacity of a top-level window. (#405316)
2007-04-30  Tor Lillqvist  <tml@novell.com>

	Add functionality to set overall opacity of a top-level
	window. (#405316)

	* gdk/gdk.symbols: Add gdk_window_set_opacity.

	* gdk/x11/gdkwindow-x11.c
	* gdk/win32/gdkwindow-win32.c: Implement
	gdk_window_set_opacity(). On X11 use the _NET_WM_WINDOW_OPACITY
	property. On Win32 use SetLayeredWindowAttributes(LWA_ALPHA).

	* gdk/gdkwindow.h: Declare gdk_window_set_opacity().

	* gdk/x11/gdkscreen-x11.c (gdk_screen_get_rgba_colormap): Document
	that this is not implemented in the Windows backend. Add reference
	to gdk_window_set_opacity().


svn path=/trunk/; revision=17730
2007-04-30 07:27:22 +00:00
Cody Russell
273c94e194 Win32 drop shadow goodness
svn path=/trunk/; revision=17643
2007-04-25 23:44:54 +00:00
Tor Lillqvist
cf9ae54980 Add comment clarifying that "icon name" here is not related to the
2007-02-26  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_icon_name): Add
	comment clarifying that "icon name" here is not related to the
	freedesktop.org icon naming stuff.


svn path=/trunk/; revision=17351
2007-02-26 13:48:01 +00:00
Tor Lillqvist
52b1bac8ec Improve handling of the small icon of the window class. (#152620, Kazuki
2006-10-29  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (RegisterGdkClass): Improve handling
	of the small icon of the window class. (#152620, Kazuki Iwamoto)
2006-10-28 23:58:30 +00:00
Tor Lillqvist
8a99fbc640 gdk/win32/gdkprivate-win32.h gdk/win32/gdkmain-win32.c Define WINVER and
2006-09-10  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkmain-win32.c
	* gdk/win32/gdkwindow-win32.c: Define WINVER and _WIN32_WINNT as
	0x0500 in gdkprivate-win32.h instead of doing it in two source
	files. (#355212, Mike Edenfield)

	* gdk/win32/gdkwindow-win32.c: We can also remove the ersatz
	GetAncestor() for the _MSC_VER && WINVER < 0x0500 case, I hope.
2006-09-10 17:33:29 +00:00
Tor Lillqvist
25b98a5935 gdk/win32/gdkevents-win32.c Use wide-char API for message and window
2006-09-04  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c
	* gdk/win32/gdkwindow-win32.c: Use wide-char API for message and
	window handling (PeekMessage, PostMessage, SendMessage,
	DispatchMessage, DefWindowProc, RegisterClassEx,
	CreateWindowEx). (#321597)
2006-09-03 22:50:00 +00:00
Tor Lillqvist
f3ce0228a5 No GDK_WINDOW_DISPLAY in the Win32 backend.
2006-09-03  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_beep): No
	GDK_WINDOW_DISPLAY in the Win32 backend.

	* gtk/gtkfilesystemwin32.c: Copy what Kris did to
	gtkfilesystemunix.c
2006-09-02 21:42:42 +00:00
Matthias Clasen
6760faeb4b Add a function to beep on a window. For X11, implement this with XkbBell.
2006-08-29  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkwindow.h:
	* gdk/gdk.symbols:
	* gdk/directfb/gdkwindow-directfb.c (gdk_window_beep):
	* gdk/win32/gdkwindow-win32.c (gdk_window_beep):
	* gdk/quartz/gdkwindow-quartz.c (gdk_window_beep):
	* gdk/x11/gdkwindow-x11.c (gdk_window_beep): Add a function
	to beep on a window. For X11, implement this with
	XkbBell.  (#353455, Mariano Suárez-Alvarez)
2006-08-30 03:30:43 +00:00
Tor Lillqvist
4e3d7dd088 Remove support for Windows 9x/ME. GTK+ hasn't worked on Win9x since 2.6 or
2006-08-29  Tor Lillqvist  <tml@novell.com>

	Remove support for Windows 9x/ME. GTK+ hasn't worked on Win9x
	since 2.6 or 2.8. It's pointless to keep the Win9x code in here as
	it isn't being maintained anyway. If somebody is interested, it
	can always be found in older GTK+ versions, and in CVS.

	* gdk/win32/gdkwindow-win32.c: Remove the G_WIN32_IS_NT_BASED()
	and G_WIN32_HAVE_WIDECHAR_API() tests and their false (Win9x)
	branches, and any variables or static functions used only by the
	Win9x branches.
2006-08-30 00:39:01 +00:00
Tor Lillqvist
f251cf42fd New function. Factor out code from gdk_window_shape_combine_mask().
2006-02-20  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (do_shape_combine_region): New
	function. Factor out code from gdk_window_shape_combine_mask().
	(gdk_window_shape_combine_region): Actually do something. Convert
	region to a HRGN and call do_shape_combine_region().
	(gdk_window_input_shape_combine_mask)
	(gdk_window_input_shape_combine_region)
	(gdk_window_set_child_input_shapes)
	(gdk_window_merge_child_input_shapes): New functions, dummy
	implementations.
2006-02-20 10:08:37 +00:00
John Ehresman
e847ace84b gdk/win32/gdkevents-win32.c (gdk_event_translate) <WM_MOUSEACTIVATE> Call
2006-02-08  John Ehresman  <jpe@wingware.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate)
	<WM_MOUSEACTIVATE>
	* gdk/win32/gdkwindow-win32.c (show_window_internal)
	(gdk_window_raise): Call SetWindowPos() instead of
	SetForegroundWindow() or BringWindowToTop() if the window
	shouldn't accept focus. (#327375)
2006-02-09 03:20:56 +00:00
John Ehresman
c502c9aeab Let gdk_window_set_decorations() take precedence over anything derived
2006-02-08  John Ehresman  <jpe@wingware.com>

	* gdk/win32/gdkwindow-win32.c: Let gdk_window_set_decorations()
	take precedence over anything derived from hints. Restructure
	related code and logic, add some new helper functions. (#327217)
2006-02-09 02:58:45 +00:00
Tor Lillqvist
348ffaea19 Make identical to the X11 implementation. (#322264, John Ehresman)
2006-01-02  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c
	(gdk_window_impl_win32_get_visible_region): Make identical to the
	X11 implementation. (#322264, John Ehresman)
2006-01-02 09:32:56 +00:00
Tor Lillqvist
2aadb2dff2 Implement the conditional use of FlashWindowEx() properly for MSVC
2005-11-28  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_urgency_hint):
	Implement the conditional use of FlashWindowEx() properly for MSVC
	compilations. The code was confusingly assuming that if compiled
	with a "new" compiler, it will only be run on "new" Windows
	versions. We want it to run on "old" versions, too, even if
	compiled with a "new" compiler. There are two orthogonal issues:
	whether the compiler defines the necessary API in its headers, and
	whether it is present at run-time. (#318077)
2005-11-28 08:40:56 +00:00
Tor Lillqvist
3ff34d06e8 Once again rework Win32 window decoration code. Doesn't break #104514. The
2005-11-27  Tor Lillqvist  <tml@novell.com>

	Once again rework Win32 window decoration code. Doesn't break
	#104514. The dialogs in gtk-demo now have the same decorations and
	behaviour as on X11. Tried to fix #322516 but it seems very hard
	to make the trivial sample program there behave as expected. OTOH,
	simply moving the gtk_window_decorate() call in the #322516 sample
	program after the call to gtk_widget_show() helps...

	* gdk/win32/gdkwindow-win32.c (set_or_clear_style_bits): Revert to
	the correct semantics. Each call to gdk_window_set_decorations()
	which calls this function is supposed to affect all decorations.

	(decorate_based_on_hints): New function, looks at both geometry
	hints and type hint and sets window decorations based on
	that. Consolidate code from gdk_window_set_geometry_hints() and
	gdk_window_set_type_hint() here.

	(gdk_window_set_geometry_hints, gdk_window_set_type_hint): Call
	decorate_based_on_hints().
2005-11-27 02:58:09 +00:00
Tor Lillqvist
575149342b Revert to the correct semantics. (#322516)
2005-11-27  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (set_or_clear_style_bits): Revert to
	the correct semantics. (#322516)
	(gdk_window_set_geometry_hints): Adjust call correspondingly.
2005-11-27 00:20:55 +00:00
Tor Lillqvist
9b5c5f9db5 Remove unnecessary includes.
2005-11-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c: Remove unnecessary includes.

	(_gdk_win32_get_adjusted_client_rect): Remove this two-line
	function which was used only in one place.

	(get_outer_rect): Use _gdk_win32_adjust_client_rect().

	(gdk_window_set_geometry_hints): If we have identical minimum and
	maximum size hints, remove the resize and maximize
	decorations/functions. (#104514)

	If we have a maximum size hint, remove the maximize
	decoration/function but ensure the resize decoration/function is
	available. Otherwise ensure both resize and maximize
	decorations/functions are there.

	(set_or_clear_style_bits): Factored out common code from
	gdk_window_set_decorations() and gdk_window_set_functions().

	Hack the window style setting once more: Only touch the window
	style bits corresponding to the GdkWMDecoration or GdkWMFunction
	parameter bitmasks. Hopefully this finally is the correct thing to
	do. We used to clear all other bits than those that were being
	set, or set all other bits than those that were being cleared.

	Take into account that adding or removing decorations leaves the
	window's outer size unchanged, i.e., the client area's size and
	position change. This is apparently not what we want, so change
	also the window's (outer) position and size appropriately so that
	the client area's position and size stay constant.

	gtk-demo's color selector dialog is now non-resizable like on X11
	(I tested with metacity in GNOME). Torn off menus are shrinkable
	vertically but have a maximum size, and are not maximizable or
	minimizable, like on X11.

	(gdk_window_set_decorations, gdk_window_set_functions): Let
	set_or_clear_decorations() do most of the job.

	* gdk/win32/gdkprivate-win32.h: Remove declaration of
	_gdk_win32_get_adjusted_client_rect().
2005-11-09 12:35:56 +00:00
Tor Lillqvist
64f1e8378b gdk/win32/gdkwindow-win32.h (struct _GdkWindowImplWin32) Store the type
2005-11-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.h (struct _GdkWindowImplWin32)
	* gdk/win32/gdkwindow-win32.c (gdk_window_impl_win32_init,
	gdk_window_get_type_hint, gdk_window_get_type_hint): Store the
	type hint. Implement gdk_window_get_type_hint() by just returning
	the hint stored.
2005-11-09 02:13:35 +00:00
Tor Lillqvist
d08d2c2bd4 Remove code that has been permanently ifdeffed out for two years.
2005-11-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_geometry_hints):
	Remove code that has been permanently ifdeffed out for two years.
2005-11-08 22:27:47 +00:00
Tor Lillqvist
c2c55f8385 gdk/win32/gdkcolor-win32.c gdk/win32/gdkscreen-win32.c Whitespace
2005-11-02  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcolor-win32.c
	* gdk/win32/gdkscreen-win32.c
	* gdk/win32/gdkwindow-win32.c: Whitespace consistency
	fixes. Remove superfluous test for GdkWindow* parameters being
	non-NULL. Testing GDK_IS_WINDOW() is enough. As there is only one
	GdkScreen and one GdkDisplay in the Win32 backend, use those
	variables instead of the getter functions. For GdkDisplay* and
	GdkScreen* parameters, check that they are equal to the
	corresponding singleton variables instead of the more general
	GDK_IS_DISPLAY() or GDK_IS_SCREEN().
2005-11-02 13:33:27 +00:00
Tor Lillqvist
bca0cefe1c Set the shaped flag here, too. (#316871)
2005-09-26  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_shape_combine_mask): Set
	the shaped flag here, too. (#316871)
	(gdk_window_shape_combine_region): Currently unimplemented, so
	don't do anything to the shaped flag here.
2005-09-26 20:59:31 +00:00
Hans Breuer
e5d06c7ca9 fix typo for GTK_VER; define HAVE_CONFIG_H cause gtkprogressbar.c has
2005-09-18  Hans Breuer  <hans@breuer.org>

	* gtk/makefile.msc.in : fix typo for GTK_VER; define HAVE_CONFIG_H
	cause gtkprogressbar.c has #include <config.h> conditionally; less
	noise from generated gtk.def
	* gtk/stock-icons/makefile.msc gdk/makefile.msc tests/makefile.msc : updated

	* gtk/gtktrayicon-win32.c : dummy implmentation to make gtk compile.
	For me it works as well as the *NIX implemenation, that is not at all.

	* gdk/win32/gdkproperty-win32.c : implement gdk_atom_intern_static_string()

	* gdk/win32/gdkwindow-win32.c(gdk_window_set_urgency_hint) : only use
	only use (WINVER >= 0x0500) when available from the SDK. Otherwise fall
	back to true dynamic linking of FlashWindowEx. Makes gtk+ work on NT4.0
	again - if compiled properly.

	* tests/teststatusicon.c : don't use GNOME icons for testing, but icons
	already coming with Gtk+. Makes it compile on win32.
2005-09-18 12:28:42 +00:00
Owen Taylor
42dc0241f3 Handle pixmap == NULL when checking for a colormap. (Allin Cottrell).
2005-08-15  Owen Taylor  <otaylor@redhat.com>

        * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_back_pixmap):
        * gdk/win32/gdkwindow-win32.c (gdk_window_set_back_pixmap):
        * gdk/x11/gdkwindow-x11.c (gdk_window_set_back_pixmap):
        Handle pixmap == NULL when checking for a colormap.
        (Allin Cottrell).
2005-08-15 12:35:04 +00:00
Owen Taylor
c24e5e2890 gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_back_pixmap)
2005-08-12  Owen Taylor  <otaylor@redhat.com>

        * gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_back_pixmap)
        * gdk/win32/gdkwindow-win32.c (gdk_window_set_back_pixmap)
        * gdk/x11/gdkwindow-x11.c (gdk_window_set_back_pixmap): Warn if
        gdk_drawable_get_colormap (pixmap) is NULL and return.
2005-08-12 13:13:54 +00:00
Tor Lillqvist
2aec0359db Implement using FlashWindowEx(). (#309423)
2005-08-01  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_urgency_hint):
	Implement using FlashWindowEx(). (#309423)
2005-08-01 07:19:15 +00:00
Tor Lillqvist
aa49bb5089 Use wide-char API when available. (#311079, Peter Zelezny)
2005-07-21  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_title): Use
	wide-char API when available. (#311079, Peter Zelezny)
2005-07-21 07:29:36 +00:00
Hans Breuer
19e9165d64 updated <io.h> for open() use G_PI instead of M_PI
2005-07-03  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc[.in] : updated
	* gtk/gtkiconcache.c : <io.h> for open()
	* gtk/gtkstyle.c : use G_PI instead of M_PI

	* gdk/win32/gdkcursor-win32.c : implement gdk_cursor_new_from_name()
	by mapping the lower case win32 api name to the respective cursor.
	E.g. pass "wait" to get the IDC_WAIT cursor. Also allows to load
	cursors from named resources in the executable.
	(gdk_cursor_get_image) : just return NULL for now.

	* gdk/win32/gdkgeometry-win32.c : implement gdk_window_move_region()
	by delegation to ScollWindowEx(), untested.

	* gdk/win32/gdkwindow-win32.c : stub for gdk_window_set_urgency_hint()
2005-07-03 15:47:42 +00:00