Added basic icon support.
[gwm.git] / ChangeLog
blobe183958c37abe26f585ee68870323bc89d1a848d
1 2009-09-06  Gary Wong  <gtw@gnu.org>
3         * decorate-core.c (core_replace_icons): New function.
4         * decorate-render.c (render_picture, assemble_image)
5         (render_replace_icons): New functions.
6         (render_update_window): Draw icons in menus where requested.
7         (decorate_render_init): Look for suitable PictFormats.
8         * gwm.c (start_managing_window): Initialise icons.
9         (unmanage_window): Deallocate icons.
10         (setup_display): Add _NET_WM_ICON property.
11         * managed.c (handle_managed_get_property, async_get_property): Use
12         the window resource ID instead of a pointer to identify the window,
13         to detect if it disappears asynchronously.
14         (handle_get_geometry): New function.
15         (managed_property_change): Handle _NET_WM_ICON, and the icon
16         parameters of WM_HINTS.
17         * menu.c (popup_menu): Allow icons in menus.
18         * actions.c (action_window_list_menu): Add icons to menu.
20 2009-09-03  Gary Wong  <gtw@gnu.org>
22         * decorate-core.c (core_text): Use utf8_next().
23         (core_window_size): Use utf8_length().
25 2009-09-02  Gary Wong  <gtw@gnu.org>
27         * utf8.c (utf8_illegal, utf8_length, utf8_next)
28         (utf8_dup_valid, utf8_dup_valid_len, dup_valid_common): New functions.
29         (to_utf8) [DEBUG]: Add sanity checks.
30         * decorate-render.c (render_text): Use utf8_length() and utf8_next().
31         (text_width): Use utf8_next().
32         * managed.c (managed_property_change): Use utf8_dup_valid_len().
34         * frame.c (recalc_size): Avoid needless C99isms.
35         * gwm.c (place_window): Likewise.
36         * window-table.c (table_hash): Likewise.
38 2009-09-01  Gary Wong  <gtw@gnu.org>
40         * actions.c (action_map_raise, action_window_list_menu)
41         (action_exit, window_list_activate): New functions.
42         * gwm.c (main): Use which_signal -1 to indicate a graceful exit.
44         * menu.c (menu_button_release, popup_menu): Remember the window
45         parameter by resource ID, instead of by pointer.  That way, it is
46         simple to detect whether the window has been destroyed between
47         creation and activation of the menu.
49         * menu.c (menu_enter_notify): Don't try to measure the active item
50         when nothing is active.
52         * menu.c (destroy_menu): Don't free NULL labels.
53         (popup_menu): Don't strdup() NULL labels.
55 2009-09-01  Gary Wong  <gtw@gnu.org>
57         * actions.c (action_iconify_window, action_deiconify_window): New
58         functions.
59         * keyboard.c (establish_grabs): Replace NUM_KEY_ACTIONS with new
60         num_key_actions symbol.
61         * managed.c (set_managed_state, iconic_to_normal): Moved from gwm.c.
62         (normal_to_iconic): New function.
63         * gwm.c (handle_client_message): Use new normal_to_iconic() function.
64         * root.c (root_key_press): Likewise.
66 2009-09-01  Gary Wong  <gtw@gnu.org>
68         * menu.c, menu.h: New files.
69         * actions.c: Added callback parameter to all actions.  All callers
70         changed.
71         (action_root_menu, action_window_menu): New functions.
72         * decorate-core.c (core_update_window): Draw menu items.
73         (core_window_size): New function.
74         * decorate-render.c (render_update_window): Draw menu items.
75         (text_width, render_window_size): New functions.
76         * frame.c (recalc_size): Call window_size() to obtain feedback
77         dimensions.
78         (frame_button_press): Pop up a menu on button 2 presses.
79         * gwm.c (show_window): Annotate menu windows.
80         (setup_display): Initialise window_size.
81         (start_managing_window): Add OwnerGrabButton to frame windows.
82         (setup_display): Add OwnerGrabButton to the roots.
84 2009-09-01  Gary Wong  <gtw@gnu.org>
86         * gwm.c (handle_events): Replace passive_grab with pointer_demux,
87         which redirects events on the client side.
88         (start_managing_window): Set initial event mask for
89         the frame button window, instead of an explicit GrabButton.
90         * button.c (button_button_press, button_button_release): Use
91         pointer_demux instead of GrabButton.
92         (button_enter_notify, button_leave_notify): Inspect event parameters
93         to determine which window is entered/left.
94         * frame.c (frame_button_press, frame_button_release): Use
95         pointer_demux instead of passive_grab.
96         (frame_motion_notify, frame_destroy_notify): Likewise.
97         (frame_enter_notify): Ignore events when pointer_demux is set.
98         * window-table.c (forget_window): Remove pointer_demux from
99         forgotten windows.
101 2009-08-31  Gary Wong  <gtw@gnu.org>
103         * gwm.c (show_atom): Declare predefined_names[] as const.
104         (show_error): Declare render_strings[] as const.
105         (show_event): Declare event_names[] as const.
106         (setup_display): Use auto storage class for wm_atom_str.
108 2009-08-31  Gary Wong  <gtw@gnu.org>
110         * gwm.c (start_managing_window): Create "border region" input-only
111         windows, to allow setting different cursors on various border parts.
113         * frame.c (frame_configure_notify): Update the geometry of the
114         border regions.
115         * decorate-core.c (decorate_core_init): Cursor indices were rearranged.
116         * decorate-render.c (decorate_compat_init): Likewise.
118         * frame.c (frame_button_press): Do not recognise a passive grab
119         propagated from the client.
121 2009-08-31  Gary Wong  <gtw@gnu.org>
123         * frame.c (frame_t, frame_xb): Make window decorations optional.
124         (frame_blr): New function.
125         (frame_b, frame_l, frame_r): Invoke frame_blr().
126         (deactivate_focus_frame): Moved from gwm.c.
127         (frame_button_press, frame_enter_notify): Make window decorations
128         optional.
129         * gwm.c (start_managing_window): Likewise.
130         (setup_display): Add _MOTIF_WM_HINTS property.
131         * managed.c (managed_property_change): Handle _MOTIF_WM_HINTS property.
132         (match_managed_shape): Retrieve _MOTIF_WM_HINTS when a client
133         window is no longer bounding shaped.
135 2009-08-31  Gary Wong  <gtw@gnu.org>
137         * button.c (button_size, button_xb): New functions.  All references
138         to former constants updated.
139         * frame.c (frame_t, frame_b, frame_l, frame_r, frame_xb): New
140         functions.  All references to former constants updated.
141         (translate_child_to_frame, translate_frame_to_child): Moved
142         from gwm.c.
143         (apply_size_constraints): Likewise.
145 2009-08-30  Gary Wong  <gtw@gnu.org>
147         * frame.c (frame_button_release): Ignore the event unless the
148         window was the one to establish the passive grab.
149         (frame_destroy_notify): New function.
151 2009-08-30  Gary Wong  <gtw@gnu.org>
153         * decorate-render.c (lookup_face): New function.
154         (query_metrics, query_glyph, replace_glyph, render_text): Take style
155         into consideration.
156         (render_update_window): Use styles, as appropriate.
157         (decorate_render_init): Remember fontconfig charsets and patterns
158         for each face in each style.
159         (decorate_render_done): Clean up fontconfig charsets and patterns.
161 2009-08-29  Gary Wong  <gtw@gnu.org>
163         * frame.c (build_edges): Use xmalloc() instead of malloc().
165 2009-08-29  Gary Wong  <gtw@gnu.org>
167         * managed.c (managed_property_change): Use _NET_WM_NAME in preference
168         to WM_NAME.
169         (async_get_property): New function.
170         (managed_property_notify): Use async_get_property.
171         * gwm.c (start_managing_window): Initialise net_wm_name.
172         (setup_display): Add _NET_WM_NAME property.
174 2009-08-28  Gary Wong  <gtw@gnu.org>
176         * frame.c (recalc_size): Initialise feedback->u.feedback.
178 2009-08-28  Gary Wong  <gtw@gnu.org>
180         * gwm.c (unmanage_window): Put the parent of the unmanaged child
181         into a childless state, so that lingering events can be handled
182         correctly.
183         (handle_destroy_window): New function.
184         (show_window): Annotate childless windows.
185         * managed.c (withdrawn_map_request, withdrawn_configure_request): New
186         functions.
188 2009-08-28  Gary Wong  <gtw@gnu.org>
190         * decorate-render.c (decorate_render_init): Cast FONT_NAME
191         to (FcChar8 *).
193 2009-08-28  Gary Wong  <gtw@gnu.org>
195         * gwm.c (shutdown_display): Reparent the windows in strict stacking
196         order.
198 2009-08-28  Gary Wong  <gtw@gnu.org>
200         * decorate-render.c (query_metrics, render_text, render_update_window,
201         decorate_render_init): Replace FONT_FAMILY, FONT_WEIGHT,
202         FONT_PIXEL_SIZE, FONT_LOAD_TARGET with FONT_NAME.
204 2009-08-28  Gary Wong  <gtw@gnu.org>
206         * decorate-render.c (query_metrics, replace_glyph): Don't
207         bother comparing the first cache line with itself.
209 2009-08-27  Gary Wong  <gtw@gnu.org>
211         * decorate-render.c, decorate-render.h: New files.  Implement
212         window decoration with RENDER extension (text only, so far).
213         * gwm.c (setup_display, shutdown_display): Set up and clean up
214         RENDER extension when available.
215         (show_error): Show RENDER errors.
217         * decorate-core.c (core_update_window): Issue SetClipRectangles
218         request.
220 2009-08-27  Gary Wong  <gtw@gnu.org>
222         * gwm.c (sync_with_callback): Perform the sequence comparison
223         with unsigned arithmetic, so that overflow semantics are
224         well-defined.
226 2009-08-27  Gary Wong  <gtw@gnu.org>
228         * frame.c (recalc_size): Implement edge resistance when resizing
229         frames.
230         (edge_resist): New function.
232 2009-08-26  Gary Wong  <gtw@gnu.org>
234         * frame.c (frame_motion_notify, frame_button_release): Implement
235         edge resistance when moving frames.
236         (build_edges, free_edges, h_edge_compare, v_edge_compare): New
237         functions.
239 2009-08-25  Gary Wong  <gtw@gnu.org>
241         * frame.c (frame_motion_notify): Ignore single pixel movements, and
242         account for window border.
244 2009-08-25  Gary Wong  <gtw@gnu.org>
246         * window-table.c (queue_window_update): Mark the update box as
247         uncleared if we enlarge the bounding box.
249 2009-08-25  Gary Wong  <gtw@gnu.org>
251         * gwm.c, gwm.h (warning, fatal): Export warning and fatal functions.
253 2009-08-25  Gary Wong  <gtw@gnu.org>
255         * window-table.c (queue_window_update): Properly compute the
256         update region when the old region was empty.
258 2009-08-24  Gary Wong  <gtw@gnu.org>
260         * gwm.c (shutdown_display) [DEBUG]: Call muntrace() only when
261         [HAVE_MTRACE].
263 2009-08-23  Gary Wong  <gtw@gnu.org>
265         * managed.c (managed_shape_notify): Respond to ShapeNotify events
266         only when they describe modifications to the bounding region.
268 2009-08-22  Gary Wong  <gtw@gnu.org>
270         * gwm.c (start_managing_window): Send a synthetic ConfigureNotify
271         to the client, because we've almost certainly moved their window.
273 2009-08-22  Gary Wong  <gtw@gnu.org>
275         * actions.c, actions.h, button.c, button.h, decorate-core.c,
276         decorate-core.h, frame.c, frame.h, gwm.c, gwm.h, keyboard.c,
277         keyboard.h, managed.c, managed.h, root.c, root.h, utf8.c, utf8.h,
278         window-table.c, window-table.h, Makefile.am, configure.ac: New
279         files, and version 1.0 release.