summaryrefslogtreecommitdiff
path: root/gdk
Commit message (Collapse)AuthorAgeFilesLines
* Document the "direction-changed" and "keys-changed" signals.Matthias Clasen2003-09-304-1/+47
| | | | | | | | | | | | | | | | | | | | | | 2003-09-30 Matthias Clasen <maclas@gmx.de> * gdk/gdkkeys.c (gdk_keymap_class_init): Document the "direction-changed" and "keys-changed" signals. * gdk/gdkscreen.c (gdk_screen_class_init): Document the "size-changed" signal. * gdk/gdkdisplaymanager.c (gdk_display_manager_class_init): Document the "display-opened" signal. * gdk/gdkdisplay.c (gdk_display_close): Doc tweak. (gdk_display_class_init): Document the "closed" signal. * gdk/tmpl/keys.sgml: Small addition. * gdk/gdk-sections.txt: Add GdkDisplayClass and GdkScreenClass. * gdk-pixbuf/gdk-pixbuf-sections.txt: Add GdkPixbufLoaderClass.
* Don't use hardcoded DEMOCODEDIR on Windows.Tor Lillqvist2003-09-251-106/+120
| | | | | | | | | | | | | | | | | | | | | 2003-09-25 Tor Lillqvist <tml@iki.fi> * demos/gtk-demo/main.c: Don't use hardcoded DEMOCODEDIR on Windows. 2003-09-21 Tor Lillqvist <tml@iki.fi> * gdk/win32/gdkevents-win32.c (handle_wm_paint): New function. Code split out from gdk_event_translate(). Needed because gdk_event_get_graphics_expose() couldn't do anything sensible otherwise. (Not that I think graphics exposes work anyway in gdk/win32, but at least now the code could work.) (gdk_event_get_graphics_expose): Call handle_wm_paint() instead of gdk_event_translate(), which couldn't have worked as it doesn't take any pre-allocated GdkEvent parameter any longer. (gdk_event_translate): Handle WM_MOUSEACTIVATE: Don't let GDK_WINDOW_TEMP windows be activated. (#122578, John Ehresman)
* Handle dead keysyms present on the US-International keyboard. For clarity,Tor Lillqvist2003-09-191-22/+33
| | | | | | | | | | | 2003-09-19 Tor Lillqvist <tml@iki.fi> * gdk/win32/gdkkeys-win32.c (update_keymap): Handle dead keysyms present on the US-International keyboard. For clarity, order keysyms in case statement according to numeric value. (gdk_keymap_translate_keyboard_state): Handle Caps Lock correctly. (#120176, Ken Rastatter and Owen Taylor)
* Add gdk_window_set_keep_{above,below} stubs to fix compilationEric Warmenhoven2003-09-163-18/+59
| | | | | | | | | | | | | Tue Sep 16 10:42:00 2003 Eric Warmenhoven <eric@warmenhoven.org> * gdk/linux-fb/gdkwindow-fb.c: Add gdk_window_set_keep_{above,below} stubs to fix compilation * gdk/linux-fb/gdkrender-fb.c: Add gdk_shadow_fb_stop_updates stub for when shadowfb is disabled. Patch from pjm@cctechnol.com (#120847). * gdk/linux-fb/gdkmouse-fb.c: Add GDK_MOUSE_DEVICE environment variable. Patch from Marc Welz (#121347).
* Remove special-case code for WS_EX_TRANSPARENT (GDK_INPUT_ONLY) windows,Tor Lillqvist2003-09-141-10/+0
| | | | | | | | | 2003-09-14 Tor Lillqvist <tml@iki.fi> * gdk/win32/gdkwindow-win32.c (show_window_internal): Remove special-case code for WS_EX_TRANSPARENT (GDK_INPUT_ONLY) windows, the usefulness of which was already in doubt. Removing it fixes bugs #118575 and #121851.
* Add deprecation notes. (#121955)Matthias Clasen2003-09-112-1/+13
| | | | | | | 2003-09-12 Matthias Clasen <maclas@gmx.de> * gdk/gdkdraw.c (gdk_draw_string, gdk_draw_text) (gdk_draw_text_wc): Add deprecation notes. (#121955)
* //bugs.xfree86.org/show_bug.cgi?id=534)Owen Taylor2003-09-051-27/+0
| | | | | | | | | | | Fri Sep 5 14:15:10 2003 Owen Taylor <otaylor@redhat.com> * Back out locale-dependent interpretation of KP_Decimal, the official XFree86 interpretation is that KP_Decimal => . KP_Separator => , always, independent of locale. (#105161, Frederic Crozat, http://bugs.xfree86.org/show_bug.cgi?id=534)
* big patch from Kjartan Maraas to fix numerous typos.Kristian Rietveld2003-09-033-4/+4
| | | | | | | | | | | | Wed Sep 3 21:38:26 2003 Kristian Rietveld <kris@gtk.org> * gdk/Makefile.am, gdk/linux-fb/gdkfbmanager.c, gdk/x11/gdkcolor-x11.c, gdk-pixbuf/io-gif.c, gtk/Makefile.am, gtk/gtkcalendar.c, gtk/gtkclist.c, gtk/gtkctree.c, gtk/gtkdnd.c, gtk/gtkentry.c, gtk/gtkhandlebox.c, gtk/gtkitemfactory.c, gtk/gtkmenu.c, gtk/gtknotebook.c, gtk/gtkrange.c, gtk/gtkrc.h, gtk/gtktree.c, gtk/gtktypeutils.h: big patch from Kjartan Maraas to fix numerous typos.
* Don't call CloseHandle() on the HMODULE returned from GetModuleHandle().Tor Lillqvist2003-09-021-2/+0
| | | | | | | | | | | | | 2003-09-02 Tor Lillqvist <tml@iki.fi> * gdk/win32/gdkdisplay-win32.c (gdk_display_open): Don't call CloseHandle() on the HMODULE returned from GetModuleHandle(). Didn't cause any harm, but didn't do anything useful either. When running a GTK+ program under MS's debugger, the CloseHandle() call would cause a "first-chance exception" in ntdll.dll to show up. (The exception is caught appropriately if you let it proceed, but it confuses the person using the debugger). Thanks to Bruce Hochstetler for noticing.
* Fix bug where the background pixmap was being offset twice, once by theSoeren Sandmann2003-09-011-4/+1
| | | | | | | | Mon Sep 1 19:39:14 2003 Soeren Sandmann <sandmann@daimi.au.dk> * gdk/gdkwindow.c (gdk_window_get_bg_gc): Fix bug where the background pixmap was being offset twice, once by the ts_origin in gdk_window_get_bg_gc(), and once by gdk_draw_rectangle().
* Improve PointerHint docs. Explain is_hint field in GdkEventMotion.Matthias Clasen2003-08-271-4/+4
| | | | | | | | | | 2003-08-28 Matthias Clasen <maclas@gmx.de> * gdk/tmpl/events.sgml: Improve PointerHint docs. * gdk/tmpl/event_structs.sgml: Explain is_hint field in GdkEventMotion. (#120542) * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): Markup fix in the docs.
* Fix variable declaration not at start of block. (#120371, Damien Carbery)Owen Taylor2003-08-261-1/+2
| | | | | | | Tue Aug 26 09:57:38 2003 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkkeys-x11.c (update_keymaps): Fix variable declaration not at start of block. (#120371, Damien Carbery)
* Fix up CapsLock and NumLock handling for non-XKB. Add a special case hackOwen Taylor2003-08-251-48/+88
| | | | | | | | | Mon Aug 25 16:15:41 2003 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkkeys-x11.c: Fix up CapsLock and NumLock handling for non-XKB. Add a special case hack for NumLock on Sun servers. (Patch from Robert Basch, #115819)
* Change the interpretation of consumed_modifiers so that it contains: -Owen Taylor2003-08-211-11/+76
| | | | | | | | | | | | Thu Aug 21 15:17:42 2003 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkkeys-x11.c: Change the interpretation of consumed_modifiers so that it contains: - Modifiers combinations actually found in state. - Single modifier modifier combinations. But not multi-modifier combinations that aren't in event->state. Document. (#100439)
* Make the layers in the paint stack have their own pixmap instead ofSoeren Sandmann2003-08-201-195/+79
| | | | | | | | | | Wed Aug 20 22:04:47 2003 Soeren Sandmann <sandmann@daimi.au.dk> * gdk/gdkwindow.c: Make the layers in the paint stack have their own pixmap instead of sharing one. * tests/testgtk.c (create_get_image): Fixes to make the window fit on an 800x600 screen
* Don't use impl->position_info.clip_rect for toplevels. (#107068, reportedOwen Taylor2003-08-191-4/+15
| | | | | | | | Tue Aug 19 13:58:50 2003 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkgeometry-x11.c (gdk_window_scroll): Don't use impl->position_info.clip_rect for toplevels. (#107068, reported by Thomas Mirlacher)
* Add a fallback for unaligned source data for FORMAT_ARGB_MASK. (#117217)Owen Taylor2003-08-181-40/+57
| | | | | | | | Mon Aug 18 11:48:51 2003 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkdrawable-x11.c (convert_to_format): Add a fallback for unaligned source data for FORMAT_ARGB_MASK. (#117217)
* Make the list of default languages more comprehensive. (Suggestion of Fco.Owen Taylor2003-08-161-1/+1
| | | | | | | | | | | | | Sat Aug 16 10:34:49 2003 Owen Taylor <otaylor@redhat.com> * modules/input/imcedilla.c: Make the list of default languages more comprehensive. (Suggestion of Fco. Javier F. Serrador) Sat Aug 9 12:47:11 2003 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_arg_context_parse): Fix broken parentheses when skipping args.
* Fixes for X/Cygwin builds of GTK+ (#107623, Masahiro Sakai):Owen Taylor2003-08-151-0/+2
| | | | | | | | | | | | | | | | Fri Aug 15 12:34:04 2003 Owen Taylor <otaylor@redhat.com> Fixes for X/Cygwin builds of GTK+ (#107623, Masahiro Sakai): * configure.in (GDK_DEP_LIBS_FOR_X): Make sure that we link libgtk against X explicitely, since we make GTK+ calls for plug/socket. * gtk/queryimmodules.c: Use USE_LA_MODULES and G_MODULE_SUFFIX here. * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_image): Protect XShmPutImage with #ifdef USE_SHM.
* Add missing break statements (#119494, Soeren Sandmann)Owen Taylor2003-08-111-11/+11
| | | | | | | Mon Aug 11 12:07:14 2003 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkevents-x11.c (get_real_window): Add missing break statements (#119494, Soeren Sandmann)
* Add support for EWMH "Above" and "Below" window states. (105100, Manuel Clos)Matthias Clasen2003-08-104-1/+80
|
* Elaborate a bit more in the docs on GdkFilterFunc and GdkFilterReturn.Noah Levitt2003-08-091-1/+3
| | | | | | | | 2003-08-09 Noah Levitt <nlevitt@columbia.edu> * gdk/gdkevents.h: * docs/reference/gdk/tmpl/windows.sgml: Elaborate a bit more in the docs on GdkFilterFunc and GdkFilterReturn.
* Fix a segfault. (#115284, Jan Kratochvil)Matthias Clasen2003-08-081-4/+0
| | | | | | | 2003-08-08 Matthias Clasen <maclas@gmx.de> * gdk/gdkregion-generic.c (gdk_region_spans_intersect_foreach): Fix a segfault. (#115284, Jan Kratochvil)
* Print also the root coordinates for events that have such. PrintTor Lillqvist2003-08-082-22/+42
| | | | | | | | | | | | | | | 2003-08-08 Tor Lillqvist <tml@iki.fi> * gdk/win32/gdkevents-win32.c (print_event): Print also the root coordinates for events that have such. Print coordinates for enter and leave events. (gdk_event_translate): Don't use event uninitialixed in the return_exposes branch of the WM_PAINT handler. * gdk/win32/gdkwindow-win32.c (gdk_window_new, _gdk_windowing_window_get_pointer, _gdk_windowing_window_at_pointer): Must offset top-level window coordinates here, too.
* gdk/win32/gdkinput-win32.h Drop the GdkEvent* parameter, it wasn't used.Tor Lillqvist2003-08-078-147/+442
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-08-07 Tor Lillqvist <tml@iki.fi> * gdk/win32/gdkinput-win32.h * gdk/win32/gdkinput-win32.c (_gdk_input_configure_event, _gdk_input_enter_event): Drop the GdkEvent* parameter, it wasn't used. * gdk/win32/gdkevents-win32.c (gdk_event_translate): Adapt caller accordingly, in fact an uninitialised variable was dereferenced. [Win32] Add support for multiple monitors. * gdk/win32/gdkprivate-win32.h * gdk/win32/gdkglobals-win32.c: New global variables for multiple-monitor info: _gdk_num_monitors, _gdk_monitors, and _gdk_offset_x and _gdk_offset_y. * gdk/win32/gdkdisplay-win32.c (count_monitor, enum_monitor): New functions, enumeration functions passed to EnumDisplayMonitors(). (gdk_display_open): If the EnumDisplayMonitors() and GetMonitorInfo() API is present (on Win98, Win2000 and newer), use if to find out monitor info. Calculate the offset between Win32 coordinates (relative to the primary monitor's origin (and thus negative on monitors to the left of or above it), and GDK's (visible coordinates should be non-negative). * gdk/win32/gdkscreen-win32 (gdk_screen_get_n_monitors, gdk_screen_get_monitor_geometry): Use information collected above. (gdk_window_move, gdk_window_move_resize_window_get_geometry): Subtract _gdk_offset_{x,y} from GDK root window coordinates. (gdk_window_get_geometry, gdk_window_get_origin, gdk_window_get_frame_extents): For top-level windows, add _gdk_offset_{x,y} to GDK root window coordinates Still need to handle multiple monitors in gdk_window_fullscreen(). Probably should make the window fullscreen on the monitor where the cursor is? * gdk/win32/gdkevents-win32.c: Add _gdk_offset_{x,y} to all GDK root window coordinates in GdkEvents. [Win32] Fix geometry hint handling. Add support for resize increment and base size, and aspect ratio geometry hints. The "gridded geometry" test in testgtk now works beautifully. * gdk/win32/gdkwindow-win32.c (gdk_window_set_geometry_hints): Turns out this function shouldn't actually ever modify the window's size, just store the hints. (Old code kept for a while inside #if 0.) (gdk_window_set_hints): Remove presumably broken code that handles the position hints, this function is obsolete anyway. * gdk/win32/gdkevents-win32.c: Drop the current_{x,y}_root variables, not used. (adjust_drag): New function, used to implement resize increment hints. (gdk_event_translate): Handle WM_SIZING, implement resize increment and base size, and aspect ratio geometry hints here. The WM_GETMINMAXINFO handler takes care of the minimum and maximum size hints as before. Fix the WM_GETMINMAXINFO handler to take into account window decorations. No need to modify the ptMaxPosition and ptMaxSize fields in the MINMAXINFO struct, the defaults are fine. * gdk/win32/gdkprivate-win32.h * gdk/win32/gdkwindow-win32.c (_gdk_win32_adjust_client_rect, _gdk_win32_get_adjusted_client_rect): New helper functions.
* Reset the toplevel->have_* flags before iterating over the _NET_WM_STATEMatthias Clasen2003-08-071-1/+6
| | | | | | | 2003-08-07 Matthias Clasen <maclas@gmx.de> * gdk/x11/gdkevents-x11.c (gdk_check_wm_state_changed): Reset the toplevel->have_* flags before iterating over the _NET_WM_STATE atoms. (#119217)
* finally use TrackMouseEvent (only if the new window not known to Gdk) toHans Breuer2003-08-071-6/+85
| | | | | | | | | | | | | 2003-08-07 Hans Breuer <hans@breuer.org> * gdk/win32/gdkevents-win32.c : finally use TrackMouseEvent (only if the new window not known to Gdk) to get proper leave notification, and get rid of the wrong placed tooltips, bug #102283 (gdk_event_translate) : small code reordering to not get GDK_MOTION_NOTIFY for still mouse and get back tooltips on menus, bug #117367
* gdk/gdk.def Add missing function, trivially implement.Tor Lillqvist2003-08-072-0/+10
| | | | | | | | 2003-08-07 Tor Lillqvist <tml@iki.fi> * gdk/gdk.def * gdk/win32/gdkfont-win32.c (gdk_fontset_load_for_display): Add missing function, trivially implement.
* initialize bits to 0 (probably default on NT)Hans Breuer2003-08-061-1/+1
| | | | | | | | | 2003-08-06 Hans Breuer <hans@breuer.org> * gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new) : initialize bits to 0 (probably default on NT) now really ...
* initialize bits to 0 (probably default on NT)Hans Breuer2003-08-061-0/+2
| | | | | | | 2003-08-06 Hans Breuer <hans@breuer.org> * gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new) : initialize bits to 0 (probably default on NT)
* now it works as intended ;-)Hans Breuer2003-08-061-2/+59
| | | | | | | 2003-08-06 Hans Breuer <hans@breuer.org> * gdk/win32/gdkwindow-win32.c (gdk_window_set_icon) : now it works as intended ;-)
* set HWND_NOTOPMOST for modal==FALSE, fixes bug #118435Hans Breuer2003-08-053-8/+132
| | | | | | | | | | | | | | | | | | | | | 2003-08-04 Hans Breuer <hans@breuer.org> * gdk/win32/gdkwindow-win32.c(gdk_window_set_modal_hint) : set HWND_NOTOPMOST for modal==FALSE, fixes bug #118435 * gdk/win32/gdkwindow-win32.c : implement gdk_window_[un]fullscreen (gdk_window_{move,resize,move_rezize})) : noop if FULLSCREEN * gdk/win32/gdkwindow-win32.c (gdk_window_set_icon) : against all expectations it is basically ony a call with WM_SETICON needed (the visual effect is there, though colors or mask are still somewhat wrong). * gdk/win32/gdkwindow-win32.h : place to store the HICON * gdk/win32/gdkdrawabke.win32.c : readded the conditional end pixel drawing as it was fixed at 1999-08-23 gtk/gtk.def : updated
* Fix problem where use_xshm was getting set wrong if MIT_SHM wasn't found.Owen Taylor2003-08-041-1/+1
| | | | | | | | Mon Aug 4 14:53:46 2003 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkimage-x11.c (_gdk_windowing_image_init): Fix problem where use_xshm was getting set wrong if MIT_SHM wasn't found. (George Lebel)
* 2003-08-04 Tor Lillqvist <tml@iki.fiTor Lillqvist2003-08-041-4/+10
| | | | | | | * gdk/win32/gdkevents-win32.c (apply_filters): Fix braino: actually use the passed-in filter list. The function also needs a GdkWindow parameter, as filter functions expect GdkEvent::any.window to be valid. (#119034, Hans Breuer)
* Improve wording of the docs, avoid the term "virtual screen". (#119030,Matthias Clasen2003-08-031-7/+5
| | | | | | | | 2003-08-03 Matthias Clasen <maclas@gmx.de> * gdk/x11/gdkscreen-x11.c (gdk_screen_get_n_monitors): (gdk_screen_get_monitor_geometry): Improve wording of the docs, avoid the term "virtual screen". (#119030, Tor Lillquist)
* Use g_setenv() instead of putenv().Matthias Clasen2003-08-021-3/+2
|
* Requires glib-2.3.0, pango-1.2.0.Owen Taylor2003-08-0212-234/+19
| | | | | | | | | | | | | | | | | | | Sat Aug 2 12:53:16 2003 Owen Taylor <otaylor@redhat.com> * configure.in: Requires glib-2.3.0, pango-1.2.0. * configure.in: Require Xft version 2, remove code for handling older versions of pango and Xft. Many miscellaneous improvements to X checks * acinclude.m4: Add GTK_ADD_LIB() macro for adding a library to a variable, avoiding dups. * gdk/x11/gdkfont-x11.c (gdk_font_from_description_for_display): Always load "fixed" * gdk/x11/gdk*-x11.[ch]: Remove support for Xft1 and for pangox.
* Fix gdk/win32 window geometry handling again. The window position in aTor Lillqvist2003-08-023-131/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-08-02 Tor Lillqvist <tml@iki.fi> Fix gdk/win32 window geometry handling again. The window position in a GDK_CONFIGURE event should be that of the client area, not of the window decorations. (I was confused by the term "window border" in X11. It does *not* mean the window manager decorations. There are no X11-style window borders in Win32.) Also, this time do take the geometry hints into account appropriately when moving windows. Now testgtk's gravity test's move buttons work OK. There are stil problems with taking gravity into account when showing a hidden window. * gdk/win32/gdkwindow-win32.h: Keep a whole GdkGeometry as hints instead of separate fields. * gdk/win32/gdkevents-win32.c (handle_configure_event): Don't adjust for decorations. * gdk/win32/gdkwindow-win32.c (get_outer_rect, adjust_for_gravity_hints): New functions. (gdk_window_move, gdk_window_resize, gdk_window_move_resize): Use above functions, take geometry hints into account. (gdk_window_set_geometry_hints): Size hints specicy client area, not including decorations.
* If the check for missing depths, try actually creating pixmaps of theOwen Taylor2003-08-011-0/+31
| | | | | | | | | Fri Aug 1 16:30:13 2003 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkdrawable-x11.c (_gdk_x11_have_render): If the check for missing depths, try actually creating pixmaps of the depths to deal with Xinerama not reporting all the depths it should. (#115822)
* g_set_prgname("<unknown>") if argc is 0 as well, instead of leaving itOwen Taylor2003-08-011-11/+11
| | | | | | | | Fri Aug 1 15:06:25 2003 Owen Taylor <otaylor@redhat.com> * gdk/gdk.c (gdk_parse_args): g_set_prgname("<unknown>") if argc is 0 as well, instead of leaving it unset. (#116023, Michael Meeks)
* Fix for #108007, #112402, #117042: There was confusion in gdk/win32 atTor Lillqvist2003-07-293-260/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-07-29 Tor Lillqvist <tml@iki.fi> Fix for #108007, #112402, #117042: There was confusion in gdk/win32 at various places whether a window position refers to the decoration position or the client area position. Also whether window size includes decorations or not. The correct interpretation apparently is that in GDK (like in X11), a top-level window position means the decoration's position, but size means the window's inner size (client area size). In the Win32 API, the window size usually includes the decorations, though. * gdk/win32/gdkevents-win32.c (decode_key_lparam): Move inside #ifdef G_ENABLE_DEBUG. (handle_configure_event): New function, generates GDK_CONFIGURE events from WM_SIZE and WM_MOVE messages. Even if no event is generated because of the event mask, still set the private position and size fields. Calculate position and size correctly. (gdk_event_translate): Call handle_configure_event(). * gdk/win32/gdkgeometry-win32.c: Cosmetics. * gdk/win32/gdkwindow-win32.c: Use GDI_CALL() and API_CALL() macros. Cosmetic debugging output changes. (SafeAdjustWindowRectEx): Remove. If an application wants to locate a window outside of the screen, it's not GDK's business to prevent it. And anyway, with multiple monitors, negative coordinates are perfectly normal. (gdk_window_new): Adjust the window size for decorations after _gdk_window_init_position() has done its job. (But the big window code currently is presumably broken on Win32 anyway.) (gdk_window_move): The position passed in is supposed to be that of the window border, so don't need to adjust for decorations. (gdk_window_resize, gdk_window_move_resize): Simplify somewhat.
* On Win9x, the keyboard state returned by GetKeyboardState() doesn'tTor Lillqvist2003-07-271-1/+16
| | | | | | | | | | | 2003-07-27 Tor Lillqvist <tml@iki.fi> * gdk/win32/gdkevents-win32.c (build_key_event_state): On Win9x, the keyboard state returned by GetKeyboardState() doesn't distinguish between the left and right Control and Alt keys. Thus we cannot detect AltGr (which is supposed to be left Control + right Alt) the same way as on NT-based systems, but have to accept either Control + either Alt as AltGr.
* gdk/win32/gdkprivate-win32.h New flags _gdk_input_locale_is_ime andTor Lillqvist2003-07-267-1373/+1048
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-07-25 Tor Lillqvist <tml@iki.fi> * gdk/win32/gdkprivate-win32.h * gdk/win32/gdkglobals-win32.c: New flags _gdk_input_locale_is_ime and _gdk_keyboard_has_altgr. * gdk/win32/gdkevents-win32.c: Lots of changes. Most important ones detailled here. Code that has been ifdeffed out for a long time removed. Remove some really old doc comments that were left behind for some public functions, the official ones are in the X11 backend anyway. Change GDK_WINDOW_OBJECT() calls to GdkWindowObject casts. Reformat multi-line boolean expressions to have the operators at ends of lines. As mouse capture with SetCapture() indeed seems to work OK, no need to have the correspoinding macro USE_SETCAPTURE and ifdefs. Ifdef out the gdk-ping-msg stuff. I don't remember why it was needed at some time, and things seem to work fine now without (knock on wood). Ifdef out the search for some Latin locale keyboard layout being loaded. Not used currently, but might be needed after all, if we decide that we want to be able to generate ASCII control character events with a non-Latin keyboard. (assign_object): New helper function, handles the g_object_ref() and unref() calls when assigning GObject pointers. (generate_crossing_events): Also generate the GDK_NOTIFY_INTERIOR enter event when the pointer has moved to an ancestor window. Was left out by mistake. (gdk_window_is_ancestor): Renamed from gdk_window_is_child(). (gdk_pointer_grab, gdk_pointer_ungrab): Implement the confine_to functionality, using ClipCursor(). (find_window_for_mouse_event): Splice part of code into new function find_real_window_for_grabbed_mouse_event(). (fixup_event, append_event, apply_filters): New functions, code refactored out from elsewhere. (synthesize_enter_or_leave_event, synthesize_leave_event, synthesize_enter_event, synthesize_leave_events,synthesize_enter_events): Also take a GdkCrossingMode parameter, in preparation to generating GDK_CROSSING_GRAB and GDK_CROSSING_UNGRAB events. (fixup_event, append_event, fill_key_event_string): New functions, code refactoring. (vk_from_char, build_keypress_event, build_keyrelease_event): Removed as part of dropping WM_CHAR handling. (build_key_event_state,gdk_event_translate): Call GetKeyboardState(), once, for each keyboard message, instead of several calls to GetKeyState() here and there. (gdk_event_translate): Fix bugs #104516, #104662, #115902. While at it, do some major refactoring, and some fixes for potential problems noticed while going through the code. Don't handle WM_CHAR at all. Only handle WM_KEYDOWN and WM_KEYUP. Don't need the state variables related to whether to wait for WM_CHAR or not, and whether the current key is AltGr. Remove lots of complexity. Thus don't need the use_ime_composition flag. Not handling WM_CHAR means dead key handling will have to be taken care of by GTK, but that seems to work fine, so no worry. Another side-effect is that Alt+keypad digits don't work any longer, but it's better to learn to use GTK's ISO14755 support is anyway. Be more careful in checking whether AltGr is involved. Only attempt to handle it if the keyboard actually has it. And explicitly check for *left* Control plus *right* Alt being pressed. Still, allow (left) Alt and/or (right) Control with AltGr chars. Handle keys using similar code as in the X11 backend. As we have built a keymap in gdkkeys-win32.c anyway, use it by calling gdk_keymap_translate_keyboard_state() to look up the keysym from the virtual key code and keyboard state. Build the key event string in exactly the same way as the X11 backend. If an IME is being used, don't generate GDK events for keys between receiving WM_IME_STARTCOMPOSITION and WM_IME_ENDCOMPOSITION, as those keys are for the IME. For WM_IME_COMPOSITION, handle all the Unicode chars returned from the IME, not just the first one. gdk_event_translate() is still quite complex, could split the message handler cases out into separate functions. On mouse events, when the mouse is grabbed, use find_real_window_for_grabbed_mouse_event() in order to be able to generate correct crossing events. No longer take a pre-allocated GdkEvent as parameter. Instead, allocate events as needed and append them to the queue. (This is different from how gdk_event_translate() in the X11 backend works.) This change made the code much clearer, especially in the cases where we have to generate several GDK events for one Windows message. Return FALSE if DefWindowProc() should be called, TRUE if not. If DefWindowProc() should not be called, also return the value to be returned from the window procedure. (Previously, the interaction with gdk_event_translate()'s caller was much more complex, when we had to indicate whether the already-queued event should be left in the queue or removed, and in addition also had to indicate whether to call DefWindowProc() or not, and what value to return from the window procedure if not.) Don't use a separate "private" variable required to be pointing to the GdkWindowObject of the "window" variable at all times. Just use casts, even if looks a bit uglier. Notice destroyed windows as early as possible, and break out of the messsage switch. Use _gdk_pointer_root as current_window when the pointer is outside GDK's top-level windows. On WM_INPUTLANGCHANGE, set _gdk_input_locale_is_ime as appropriate, based on ImmIsIME(). (gdk_event_translate, gdk_event_send_client_message_for_display, gdk_screen_broadcast_client_message): Implement client messages. Use a registered Windows message to pass GDK client messages. Note that the amount of user data is restricted to four bytes, as it is carried in the LPARAM. (The WPARAM is used for the message type "atom".) (real_window_procedure): Adapt for new gdk_event_translate() interface. * gdk/win32/gdkmain-win32.c (_gdk_windowing_init): Set _gdk_input_locale_is_ime initially. * gdk/win32/gdkwindow-win32.c: Use g_object_ref()/unref() instead of g_colormap_ref()/unref(). (gdk_window_new): Made code a bit more like the X11 one, pretend to handle screens (although we just have one for now). * gdk/x11/gdkevents-x11.c (gdk_event_send_client_message_for_display, gdk_screen_broadcast_client_message): Document the user data limitation on Win32. * gdk/win32/gdkevents-win32.c (print_event): More complete enter and leave notify detail output. * gdk/win32/gdkkeys-win32.c (update_keymap): Make dead keys visible to GDK and GTK. Store the corresponding GDK_dead_* keysym for those, so that the GtkIMContextCimple compose tables will work. Deduce if the keyboard layout has the AltGr key, and set the above flag accordingly.
* new file to build it all ... added to EXTRA_DISTHans Breuer2003-07-203-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-07-20 Hans Breuer <hans@breuer.org> * makefile.msc : new file to build it all * Makefile.am : ... added to EXTRA_DIST * gdk/makefile.msc gtk/stock-icons/makefile.msc gtk/makefile.msc.in tests/makefile.msc : updated * gdk/gdk.def gtk/gtk.def : export a bunch of new functions * gtk/gtkbbox.c : use g_return_val_if_fail() if there is a value to return * gtk/gtkfontsel.c gtk/gtkiconfactory.c : static correctness * gtk/gtkicontheme.c : ported to use GTimeVal instead of struct timeval and GTK_DATA_PREFIX instead of GTK_DATADIR * gtk/gtkicontheme.c : use HAVE_LC_MESSAGES * gtk/gtkimmulticontext.c : use gtkprivate.h * gtk/stock-icons/stock_color_picker_25.png gtk/stock-icons/stock_jump_to_rtl_16.png gtk/stock-icons/stock_jump_to_rtl_24.png gtk/stock-icons/stock_redo_rtl_16.png gtk/stock-icons/stock_redo_rtl_24.png gtk/stock-icons/stock_undelete_rtl_16.png gtk/stock-icons/stock_undelete_rtl_24.png gtk/stock-icons/stock_undo_rtl_16.png : gtk/stock-icons/stock_undo_rtl_24.png : readded as binary
* fix cut-n-paste-oJody Goldberg2003-07-181-1/+1
| | | | | | 2003-07-16 Jody Goldberg <jody@gnome.org> * gdk/x11/gdkwindow-x11.c (gdk_window_focus) : fix cut-n-paste-o
* API doc updates.Matthias Clasen2003-07-141-1/+1
|
* gdk/x11/gdkevents-x11.c (get_real_window) gdk/x11/gdkinput-x11.cOwen Taylor2003-07-116-101/+159
| | | | | | | | | | | | | | | | | Tue Jul 8 20:11:04 2003 Owen Taylor <otaylor@redhat.com> * gdk/x11/gdkevents-x11.c (get_real_window) gdk/x11/gdkinput-x11.c (_gdk_input_common_init) gdk/x11/gdkimage-x11.c (_gdk_windowing_image_init) gdk/x11/gdkprivate-x11.h (_gdk_windowing_image_init) Don't assume that all events start with XEventAny - Xkb events don't! (#105745). So, only do that for core events, and for non-core events, add a system for registering event types that start with XEventAny. * gdk/x11/gdkevents-x11.c (gdk_event_translate): Check to see if the result of gdk_window_lookup_for_display() is actually a window.
* Fix memory access error. (#69436)Morten Welinder2003-07-111-1/+1
| | | | | | | 2003-07-11 Morten Welinder <terra@gnome.org> * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixbuf): Fix memory access error. (#69436)
* Merge from stable.Kristian Rietveld2003-07-092-11/+15
| | | | | | | | | | | | | | | Wed Jul 9 19:48:26 2003 Kristian Rietveld <kris@gtk.org> Merge from stable. * gdk/gdkdisplay.c (gdk_display_get_window_at_pointer): don't directly return from ->window_at_pointer, but set win_x and win_y first if needed. (Fixes #110166, reported by Arno Charlet). * gdk/gdkwindow.c (gdk_window_get_composite_drawable): change function to accept GdkDrawables and not just GdkWindows. This was already done in some other functions a while back, but this patch got lost for some reason.
* dear cvs, please SHUT UP love, -krisKristian Rietveld2003-07-091-0/+1
| | | | | | | dear cvs, please SHUT UP love, -kris