diff --git a/ChangeLog b/ChangeLog index 7517cc97cc..a47e7ece91 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,28 @@ +2001-01-08 Alexander Larsson + + * docs/README.linux-fb: + Correct filename ~/.pangoft2_aliases + + * gdk/gdkwindow.h: + Added new function gdk_window_get_decorations. + + * gdk/linux-fb/gdkfb.h: + Removed _gdk_window_get_decorations declaration. + Renamed _gdk_window_set_child_handler to + gdk_fb_window_set_child_handler. + + * gdk/linux-fb/gdkwindow-fb.c: + Renamed _gdk_window_set_child_handler to + gdk_fb_window_set_child_handler. + + * gdk/x11/gdkwindow-x11.c: + New function gdk_window_get_mwm_hints(). + Implemented gdk_window_get_decorations. + + * docs/reference/gdk/tmpl/windows.sgml: + * docs/reference/gdk/gdk-sections.txt: + Added gdk_window_get_decorations docs. + 2001-01-08 Alexander Larsson * gdk/linux-fb/gdkwindow-fb.c (_gdk_fb_window_find_focus, diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 7517cc97cc..a47e7ece91 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,28 @@ +2001-01-08 Alexander Larsson + + * docs/README.linux-fb: + Correct filename ~/.pangoft2_aliases + + * gdk/gdkwindow.h: + Added new function gdk_window_get_decorations. + + * gdk/linux-fb/gdkfb.h: + Removed _gdk_window_get_decorations declaration. + Renamed _gdk_window_set_child_handler to + gdk_fb_window_set_child_handler. + + * gdk/linux-fb/gdkwindow-fb.c: + Renamed _gdk_window_set_child_handler to + gdk_fb_window_set_child_handler. + + * gdk/x11/gdkwindow-x11.c: + New function gdk_window_get_mwm_hints(). + Implemented gdk_window_get_decorations. + + * docs/reference/gdk/tmpl/windows.sgml: + * docs/reference/gdk/gdk-sections.txt: + Added gdk_window_get_decorations docs. + 2001-01-08 Alexander Larsson * gdk/linux-fb/gdkwindow-fb.c (_gdk_fb_window_find_focus, diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 7517cc97cc..a47e7ece91 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,28 @@ +2001-01-08 Alexander Larsson + + * docs/README.linux-fb: + Correct filename ~/.pangoft2_aliases + + * gdk/gdkwindow.h: + Added new function gdk_window_get_decorations. + + * gdk/linux-fb/gdkfb.h: + Removed _gdk_window_get_decorations declaration. + Renamed _gdk_window_set_child_handler to + gdk_fb_window_set_child_handler. + + * gdk/linux-fb/gdkwindow-fb.c: + Renamed _gdk_window_set_child_handler to + gdk_fb_window_set_child_handler. + + * gdk/x11/gdkwindow-x11.c: + New function gdk_window_get_mwm_hints(). + Implemented gdk_window_get_decorations. + + * docs/reference/gdk/tmpl/windows.sgml: + * docs/reference/gdk/gdk-sections.txt: + Added gdk_window_get_decorations docs. + 2001-01-08 Alexander Larsson * gdk/linux-fb/gdkwindow-fb.c (_gdk_fb_window_find_focus, diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 7517cc97cc..a47e7ece91 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,28 @@ +2001-01-08 Alexander Larsson + + * docs/README.linux-fb: + Correct filename ~/.pangoft2_aliases + + * gdk/gdkwindow.h: + Added new function gdk_window_get_decorations. + + * gdk/linux-fb/gdkfb.h: + Removed _gdk_window_get_decorations declaration. + Renamed _gdk_window_set_child_handler to + gdk_fb_window_set_child_handler. + + * gdk/linux-fb/gdkwindow-fb.c: + Renamed _gdk_window_set_child_handler to + gdk_fb_window_set_child_handler. + + * gdk/x11/gdkwindow-x11.c: + New function gdk_window_get_mwm_hints(). + Implemented gdk_window_get_decorations. + + * docs/reference/gdk/tmpl/windows.sgml: + * docs/reference/gdk/gdk-sections.txt: + Added gdk_window_get_decorations docs. + 2001-01-08 Alexander Larsson * gdk/linux-fb/gdkwindow-fb.c (_gdk_fb_window_find_focus, diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 7517cc97cc..a47e7ece91 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,28 @@ +2001-01-08 Alexander Larsson + + * docs/README.linux-fb: + Correct filename ~/.pangoft2_aliases + + * gdk/gdkwindow.h: + Added new function gdk_window_get_decorations. + + * gdk/linux-fb/gdkfb.h: + Removed _gdk_window_get_decorations declaration. + Renamed _gdk_window_set_child_handler to + gdk_fb_window_set_child_handler. + + * gdk/linux-fb/gdkwindow-fb.c: + Renamed _gdk_window_set_child_handler to + gdk_fb_window_set_child_handler. + + * gdk/x11/gdkwindow-x11.c: + New function gdk_window_get_mwm_hints(). + Implemented gdk_window_get_decorations. + + * docs/reference/gdk/tmpl/windows.sgml: + * docs/reference/gdk/gdk-sections.txt: + Added gdk_window_get_decorations docs. + 2001-01-08 Alexander Larsson * gdk/linux-fb/gdkwindow-fb.c (_gdk_fb_window_find_focus, diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 7517cc97cc..a47e7ece91 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,28 @@ +2001-01-08 Alexander Larsson + + * docs/README.linux-fb: + Correct filename ~/.pangoft2_aliases + + * gdk/gdkwindow.h: + Added new function gdk_window_get_decorations. + + * gdk/linux-fb/gdkfb.h: + Removed _gdk_window_get_decorations declaration. + Renamed _gdk_window_set_child_handler to + gdk_fb_window_set_child_handler. + + * gdk/linux-fb/gdkwindow-fb.c: + Renamed _gdk_window_set_child_handler to + gdk_fb_window_set_child_handler. + + * gdk/x11/gdkwindow-x11.c: + New function gdk_window_get_mwm_hints(). + Implemented gdk_window_get_decorations. + + * docs/reference/gdk/tmpl/windows.sgml: + * docs/reference/gdk/gdk-sections.txt: + Added gdk_window_get_decorations docs. + 2001-01-08 Alexander Larsson * gdk/linux-fb/gdkwindow-fb.c (_gdk_fb_window_find_focus, diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 7517cc97cc..a47e7ece91 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,28 @@ +2001-01-08 Alexander Larsson + + * docs/README.linux-fb: + Correct filename ~/.pangoft2_aliases + + * gdk/gdkwindow.h: + Added new function gdk_window_get_decorations. + + * gdk/linux-fb/gdkfb.h: + Removed _gdk_window_get_decorations declaration. + Renamed _gdk_window_set_child_handler to + gdk_fb_window_set_child_handler. + + * gdk/linux-fb/gdkwindow-fb.c: + Renamed _gdk_window_set_child_handler to + gdk_fb_window_set_child_handler. + + * gdk/x11/gdkwindow-x11.c: + New function gdk_window_get_mwm_hints(). + Implemented gdk_window_get_decorations. + + * docs/reference/gdk/tmpl/windows.sgml: + * docs/reference/gdk/gdk-sections.txt: + Added gdk_window_get_decorations docs. + 2001-01-08 Alexander Larsson * gdk/linux-fb/gdkwindow-fb.c (_gdk_fb_window_find_focus, diff --git a/docs/README.linux-fb b/docs/README.linux-fb index 940afd496c..049e11ff0e 100644 --- a/docs/README.linux-fb +++ b/docs/README.linux-fb @@ -50,7 +50,7 @@ To your $prefix/etc/pango/pangorc or ~/.pangorc. You must also set up font aliases for the fonts Sans, Serif and Monotype. This is done by creating a $prefix/etc/pango/pangoft2.aliases or -~/.pangoft2.aliases file. You can also set the name of this file using the +~/.pangoft2_aliases file. You can also set the name of this file using the key AliasFiles in the PangoFT2 section in pangorc. An example of a font alias file is: diff --git a/docs/reference/gdk/gdk-sections.txt b/docs/reference/gdk/gdk-sections.txt index 7cadb62774..119b1c1d49 100644 --- a/docs/reference/gdk/gdk-sections.txt +++ b/docs/reference/gdk/gdk-sections.txt @@ -465,6 +465,7 @@ gdk_window_set_transient_for gdk_window_set_role gdk_window_set_group gdk_window_set_decorations +gdk_window_get_decorations GdkWMDecoration gdk_window_set_functions GdkWMFunction diff --git a/docs/reference/gdk/tmpl/windows.sgml b/docs/reference/gdk/tmpl/windows.sgml index cc811058b6..1e6c7b0c26 100644 --- a/docs/reference/gdk/tmpl/windows.sgml +++ b/docs/reference/gdk/tmpl/windows.sgml @@ -871,6 +871,16 @@ Windows @decorations: + + + + + +@window: The window to get the decorations from +@decorations: The window decorations will be written here +@Returns: TRUE if the window has decorations set, FALSE otherwise. + + diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h index 02cf42b1ac..12ab145ed9 100644 --- a/gdk/gdkwindow.h +++ b/gdk/gdkwindow.h @@ -388,6 +388,8 @@ void gdk_window_set_group (GdkWindow *window, GdkWindow *leader); void gdk_window_set_decorations (GdkWindow *window, GdkWMDecoration decorations); +gboolean gdk_window_get_decorations (GdkWindow *window, + GdkWMDecoration *decorations); void gdk_window_set_functions (GdkWindow *window, GdkWMFunction functions); GList * gdk_window_get_toplevels (void); diff --git a/gdk/linux-fb/gdkfb.h b/gdk/linux-fb/gdkfb.h index dd58400863..7478b8c71e 100644 --- a/gdk/linux-fb/gdkfb.h +++ b/gdk/linux-fb/gdkfb.h @@ -32,10 +32,8 @@ typedef void (*GdkWindowChildGetPos) (GdkWindow *window, gint *x, gint *y, gpointer user_data); -gboolean _gdk_window_get_decorations (GdkWindow *window, - GdkWMDecoration *decorations); -void _gdk_window_set_child_handler (GdkWindow *window, - GdkWindowChildChanged changed, - GdkWindowChildGetPos get_pos, - gpointer user_data); +void gdk_fb_window_set_child_handler (GdkWindow *window, + GdkWindowChildChanged changed, + GdkWindowChildGetPos get_pos, + gpointer user_data); #endif /* GDKFB_H */ diff --git a/gdk/linux-fb/gdkwindow-fb.c b/gdk/linux-fb/gdkwindow-fb.c index 07409217c4..ec656dd92f 100644 --- a/gdk/linux-fb/gdkwindow-fb.c +++ b/gdk/linux-fb/gdkwindow-fb.c @@ -1685,10 +1685,10 @@ gdk_window_set_group (GdkWindow *window, } void -_gdk_window_set_child_handler (GdkWindow *window, - GdkWindowChildChanged changed, - GdkWindowChildGetPos get_pos, - gpointer user_data) +gdk_fb_window_set_child_handler (GdkWindow *window, + GdkWindowChildChanged changed, + GdkWindowChildGetPos get_pos, + gpointer user_data) { GdkWindowChildHandlerData *data; @@ -1721,8 +1721,8 @@ gdk_window_set_decorations (GdkWindow *window, } gboolean -_gdk_window_get_decorations(GdkWindow *window, - GdkWMDecoration *decorations) +gdk_window_get_decorations(GdkWindow *window, + GdkWMDecoration *decorations) { GdkWMDecoration *dec; diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index 73199a71c9..a8e9e6fa93 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -1851,6 +1851,34 @@ gdk_window_set_group (GdkWindow *window, XFree (wm_hints); } +static MotifWmHints * +gdk_window_get_mwm_hints (GdkWindow *window) +{ + static Atom hints_atom = None; + MotifWmHints *hints; + Atom type; + gint format; + gulong nitems; + gulong bytes_after; + + if (GDK_WINDOW_DESTROYED (window)) + return NULL; + + if (!hints_atom) + hints_atom = XInternAtom (GDK_WINDOW_XDISPLAY (window), + _XA_MOTIF_WM_HINTS, FALSE); + + XGetWindowProperty (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XID (window), + hints_atom, 0, sizeof (MotifWmHints)/sizeof (long), + False, AnyPropertyType, &type, &format, &nitems, + &bytes_after, (guchar **)&hints); + + if (type == None) + return NULL; + + return hints; +} + static void gdk_window_set_mwm_hints (GdkWindow *window, MotifWmHints *new_hints) @@ -1913,6 +1941,29 @@ gdk_window_set_decorations (GdkWindow *window, gdk_window_set_mwm_hints (window, &hints); } +gboolean +gdk_window_get_decorations(GdkWindow *window, + GdkWMDecoration *decorations) +{ + MotifWmHints *hints; + gboolean result = FALSE; + + hints = gdk_window_get_mwm_hints (window); + + if (hints) + { + if (hints->flags & MWM_HINTS_DECORATIONS) + { + *decorations = hints->decorations; + result = TRUE; + } + + XFree (hints); + } + + return result; +} + void gdk_window_set_functions (GdkWindow *window, GdkWMFunction functions)