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
Wed Aug 20 22:03:25 2003 Kristian Rietveld <kris@gtk.org>
Merged from stable.
* gtk/gtkspinbutton.c (start_spinning): change the type of step
to gdouble, since it gets it's data from a gdouble (Fixes#113547).
Mon Aug 18 17:19:12 2003 Owen Taylor <otaylor@redhat.com>
* modules/input/gtkimcontextxim.[ch]: Substantially
rework the handling of status windows:
- Store the current StatusWindow in the
GtkIMContextXIM structure and vice-versa, so we
don't have to hunt the window hierarchy on
cleanup.
- Use the Gtkidget hierarchy instead of/or as well
as the GdkWindow hierarchy when finding the toplevel;
this helps for things like GtkHandlebox
- Watch GtkWidget::hierarchy_changed to catch
changes in the toplevel without changes in the
GdkWindow (reparenting)
- Never create the GtkWindow for the status window
unless we have text to display.
- Various cleanups, add lots of comments.
(#115077, much help from Takuro Ashie and Hidetoshi
Tajima in tracking this down and figuring out a fix.)
* modules/input/gtkimcontextxim.c (gtk_im_context_xim_focus_in):
* modules/input/gtkimcontextxim.c: Track the current
screen for each toplevel so that we show the status
window on the right screen. (#116340, James Su)
* modules/input/gtkimcontextxim.c: If create a new IC
when we currently have the focus, call XSetICFocus()
on it.
* modules/input/gtkimcontextxim.c (get_im): Fix bug
with multiple open screens.
Tue Aug 19 14:37:46 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimmulticontext.[ch] (struct _GtkIMMulticontext):
Replace client_window field with 'priv' pointer,
retaining binary compatibility.
* gtk/gtkimmulticontext.c (gtk_im_multicontext_set_slave):
save use_preedit/cursor_location/focus status and set
up the new slave appropriately. (#118651, Botond Botyanszki)
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)
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)
Mon Aug 18 10:51:57 2003 Owen Taylor <otaylor@redhat.com>
* configure.in: Rework handling of REBUILD_PNGS,
so that we also don't try to REBUILD_PNGS when
cross-compiling and there is no gdk-pixbuf-csource.
But give an error if gtk/stock-icons/gtkstockpixbufs.h
is not in the source tree. (Note that REBUILDS_PNG
was set backwards before, which is why you always
had to manually recreate gtkstockpixbufs.h!)
Mon Aug 18 10:19:55 2003 Owen Taylor <otaylor@redhat.com>
* gtk+-2.0-uninstalled.pc.in: Add a missing gtk/ in the
path to libgtk.la. (#120080, Benedikt Spranger)
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.
Sat Aug 16 16:22:23 2003 Kristian Rietveld <kris@gtk.org>
Fix major bug in row ref handling, so the new combo box
will actually work right (:. Bug #107748. Patch written
with help from Tim Janik.
The basic idea is to update the row refs in a closure,
before the actual signal is emitted (rather than having
the model connect signal handlers).
* gtk/gtktreemodel.c (gtk_tree_model_base_init): change
g_signal_new calls for row_inserted, row_deleted and
rows_reordered to use the new marshallers,
(row_inserted_marshall), (row_deleted_marshall),
(rows_reordered_marshall): the new marshallers,
(gtk_tree_row_ref_inserted_callback): renamed to
gtk_tree_row_ref_inserted since it isn't a callback
anymore and gets called by the marshaller now,
(gtk_tree_row_ref_deleted_callback): likewise,
(gtk_tree_row_ref_reordered_callback): likewise,
(connect_ref_callbacks), (disconnect_ref_callbacks):
removed,
(gtk_tree_row_reference_new_proxy),
(gtk_tree_row_reference_free),
(gtk_tree_row_reference_inserted),
(gtk_tree_row_reference_deleted),
(gtk_tree_row_reference_reordered): updated.
Fri Aug 15 16:54:39 2003 Owen Taylor <otaylor@redhat.com>
Improve Cedilla handling - based on a patch from Gustavo
De Nardin, #111334
* modules/input/imcedilla.c po/POTFILES.in: Input method that
produces C_WITH_CEDILLA rather than C_WITH_ACUTE for
dead_acute+c combinations. Make this the default for
fr and pt.
* gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave):
Use LC_CTYPE instead of LC_MESSAGES to pick the default
input method.
Fri Aug 15 17:00:19 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimcontextsimple.c: Fix missing compose sequence
for Multi_key+c+apostrophe.
Fri Aug 15 21:57:34 2003 Kristian Rietveld <kris@gtk.org>
Merged from stable.
* gtk/gtktreeview.c (gtk_tree_view_adjustment_changed): stop editing
on vertical scrolling. (#108035, reported by Tim Janik).
Fri Aug 15 19:43:14 2003 Kristian Rietveld <kris@gtk.org>
(Note: This is not exactly the same as the patch which went in
gtk-2-2).
* gtk/gtktreeview.c (gtk_tree_view_class_init),
(gtk_tree_view_key_press), (gtk_tree_view_search_key_press_event):
Also support the up, down, left, right, home, end, page up and
page down keys on the numpad. (#119419, reported by Alex Larsson).
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.
Thu Aug 14 18:25:39 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_populate):
Don't reposition the cursor when we aren't trying
to complete. (Fixes problems with selection on
startup, #108433, reported by Mark Finlay.)
* gtk/gtkfilesel.c (gtk_file_selection_populate): Remove
code that tried to position the cursor after the common
prefix when there was one, it wasn't working, and
would be hard to fix. Just always put the cursor
at the end when completing.
Thu Aug 14 17:58:23 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (get_current_dir_utf8): If getting
the current directory fails because of encoding
conversion problems, walk up textually to parent
directories until we can convert. (#113627)
Wed Aug 13 17:01:49 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmenushell.[ch] (gtk_menu_shell_enter_notify):
Remove usage of menu_shell->ignore leave which was
to deal with stray events we no longer get because
we do grabbing differently. Comment it as unused in
the header. (#115837, Keith Bissett)
Wed Aug 13 16:32:43 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmenu.c (gtk_menu_position, gtk_menu_window_size_request):
Fix some places that weren't properly Xinerama-ified.
* gtk/gtkmenu.c: Fix problem with windows that scroll
at the top of the screen.
Wed Aug 13 11:34:53 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcombo.c (gtk_combo_init): connect_after() to
key-press-event on the entry, so input methods get access to
key presses before GtkCombo customization.
(#115451, Botond Botyanszki)
2003-08-13 Anders Carlsson <andersca@gnome.org>
* tests/testtoolbar.c: (set_important_func), (important_toggled),
(create_items_list):
Add an important column.
Tue Aug 12 15:00:15 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_real_set_focus): Protect
against reentrancy from ::focus-out handlers.
(#118129, Felipe Heidrich)
Tue Aug 12 14:27:42 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkkeyhash.c (_gtk_key_hash_lookup): Remove
GDK_LOCK_MASK before calling
gdk_keymap_translate_keyboard_state so bindings
and accelerators are independent of the Caps-lock
key. (#115384, reported by Toni Willberg)
Mon Aug 11 11:10:07 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.h: Mark parent public as well; it's
extensively accessed in existing code, so there is
no advantage in making people use get_parent().
(Tweak to #119463 fix)
* acinclude.m4: Copy newer versions of JH_CHECK_XML_CATALOG and JH_PATH_XML_CATALOG from
gtk-doc to enable configuring without xmlcatalog in PATH. (#119115)
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.
* gtk/gtkcalendar.c: Add DND support to GtkCalendar. The selected date is dragged
as text, formatted via strftime %x. Text drops are accepted if g_date_set_parse()
can make sense of the text. A dedicated data format for date DND has not been
introduced yet, since there didn't seem to be sufficient consensus on such a format
on xdg-list. (#117297)
* gtk/gtkcalendar.c: Get the information about the first day of the week from
the locale using another instance of the "magic translated string" technique.
Ignore the display option GTK_CALENDAR_WEEK_START_MONDAY with a warning. (#87977)
* gtk/gtkcalendar.c: Complete the RTL flipping support for GtkCalendar, make it
possible to flip the headings using the "magic translated string" technique.
Translators, note the comment in gtk_calendar_init() explaining this.
2003-08-09 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcalendar.c: Add and hook in gtk_calendar_scroll,
to let the mouse wheels select the month. Scrolling down
moves forward in time. (#53134, Abigail Brady)
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.
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.
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)
Thu Aug 7 16:49:29 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_set_style_internal):
Fix a bug where on theme change, resize/redraw wasn't
properly getting queued on toplevel windows. (#116346,
Rajkumar Siva)
* gtk/gtkwidget.c (gtk_widget_invalidate_widget_windows):
Fix bug where wrong coordinates were used for toplevel
window.
2003-08-07 Matthias Clasen <maclas@gmx.de>
* gtk/gtkspinbutton.c (gtk_spin_button_default_input): Use g_strtod() to cope with C libraries with
crippled locale support. (#115293)
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
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
Fri Aug 1 15:26:46 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbar.c, gtk/toolitem.c: add new "is_important"
property
* gtk/gtkradiotoolbutton.c
(gtk_radio_tool_button_new_from_widget): Don't take a stock id
* gtk/gtkradiotoolbutton.c
(gtk_radio_tool_button_new_with_stock_from_widget): make this
function take a stock_id.
* gtk/toolbar: documentation
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)
* 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)
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)
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.
2003-08-02 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcolorsel.c (color_sample_drop_handle)
(palette_drop_handle):
* gtk/gtkcolorbutton.c (gtk_color_button_drag_data_received): Accept drops with the
wrong format, since the KDE color chooser incorrectly drops application/x-color with
format 8.
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.
Fri Aug 1 17:10:22 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (cmpl_completion_fullname): Always
return an absolute path (#115590), fix a problem where
you could crash the file selector with a looong name
by returning a newly allocated buffer.
Fri Aug 1 16:44:51 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (update_cmpl): Fix obvious reallocation
bug in rarely or never hit code path (#118071,
Tor Lillqvist)
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)
Fri Aug 1 15:33:59 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtksocket.c: Patch from Denis Mikhalkin to
forward KeyRelease events as well as KeyPress events.
(#115597)
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)
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.
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.
Sat Jul 26 15:21:27 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkimagemenuitem.c
(gtk_image_menu_item_toggle_size_request): don't request
toggle_space when the image width is 0.
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.
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
Sat Jul 19 16:26:02 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktoolbutton.c (gtk_tool_button_construct_contents): don't
attempt to add a NULL icon to the box.
Sat Jul 19 00:18:40 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkwindow.c (gtk_window_set_default_icon): Fix C99
declaration
* gtk/gtkwidget.c (gtk_widget_queue_shallow_draw): new function
(gtk_widget_real_focus_{in|out}_event): queue shallow draws
instead of full draws.
2003-07-18 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextview.c (gtk_text_view_class_init): Add a new keybinding signal, move_viewport.
(gtk_text_view_move_viewport): New function which implements the move_viewport functionality.
(gtk_text_view_move_cursor_internal): If the cursor is not visible, move the viewport. (#78669)
* gtk/gtkenums.h (GtkScrollStep): New enumeration, used for move_viewport argument.
* gtk/gtkstatusbar.c (gtk_statusbar_class_init): Add a has_resize_grip property. (#111779)
* gtk/gtkwindow.h:
* gtk/gtkwindow.c (gtk_window_set_default_icon): New method. (#95816)
* gtk/gtkmessagedialog.h:
* gtk/gtkmessagedialog.c (gtk_message_dialog_add_buttons): New method.
(#65501, Sebastian Rittau)
Fri Jul 18 18:43:01 2003 Soeren Sandmann <sandmann@daimi.au.dk>
By popular request give toolbuttons a border.
* gtk/gtktoolitem.c
(gtk_tool_item_size_allocate):
(gtk_tool_item_size_request): don't request and allocate a border
around the child
* gtk/gtktoolbutton.c
(gtk_tool_button_size_allocate):
(gtk_tool_button_size_request): remove these functions
* gtk/gtktoolbar.c
(gtk_toolbar_size_request):
(gtk_toolbar_size_allocate): request and allocate a border if we
have a shadow.
Thu Jul 17 19:24:51 2003 Kristian Rietveld <kris@gtk.org>
Merged from stable.
Fixes issues pointed out by Morten Welinder in #115140.
* gtk/gtktreeview.c (gtk_tree_view_size_request): fix comment,
(do_validate_rows): update validated_area with a logic OR instead
of a bitwise OR,
(validate_rows_handler): make the if statement match the one in
validate_rows(), so we don't leak the timeout.