Move initialisation code into its own section, if supported by the linker.
[gwm.git] / ChangeLog
blob22ebaba4fcbe0e4812a88c335def32bbea24b6c5
1 2009-09-11  Gary Wong  <gtw@gnu.org>
3         * decorate-core.c (decorate_core_init): Moved to the initialisation
4         section.
5         * decorate-render.c (decorate_render_init, decorate_compat_init):
6         Likewise.
7         * window-table.c (table_init, stack_init): Likewise.
8         * gwm.c (setup_display, unknown): Likewise.
9         (init): New function.
10         (main) [HAVE_INIT_SECTION]: Deallocate the initialisation section.
12 2009-09-10  Gary Wong  <gtw@gnu.org>
14         * gwm.c (setup_display): Make sure the root event mask change is
15         atomic with the query of its children.
16         (shutdown_display): Process any remaining MapRequest,
17         ConfigureRequest or CirculateRequest events before closing.
19 2009-09-09  Gary Wong  <gtw@gnu.org>
21         * actions.c (action_window_list_menu): Insert windows into the
22         menu by screen, in bottom-to-top stacking order.
24         * frame.c (synthetic_configure_notify): Ignore Window errors on
25         the SendEvent.
27 2009-09-08  Gary Wong  <gtw@gnu.org>
29         * actions.c (window_list_enter, window_list_leave): New functions.
30         (window_list_activate): Destroy the place holder window.
31         (action_window_list_menu): Add enter and leave actions.
32         * decorate-render.c (render_update_window): Look up menu item
33         icons each time, in case the corresponding window has been
34         destroyed.
35         * frame.c (activate_focus_frame): New function.
36         (frame_enter_notify): Call activate_focus_frame().
38         * menu.c (deactivate_menu_item): New function.
39         (menu_enter_notify, menu_leave_notify): Invoke the menu item's
40         enter and leave actions, if set.
41         (popup_menu): Store the menu item enter and leave actions.
43         * window-table.c (table_hash): Take the hash and size as parameters.
44         All callers changed.
45         (stack_init, stack_destroy, stack_lookup, stack_insert_new)
46         (stack_rehash, stack_insert, stack_insert_new, stack_insert_singleton)
47         (stack_insert_above, stack_remove, stack_move_above)
48         (stack_real_below): New functions.
50         * gwm.c (setup_display): Initialise window_stack, add
51         SubstructureNotify to the root event masks, and add the
52         roots and existing windows to the stack.
53         (shutdown_display): Use the stored stacking order instead of
54         querying it from the server.
55         * root.c (root_create_notify, root_destroy_notify)
56         (root_reparent_notify, root_configure_notify): New functions.
58         * gwm.c (event_time): New function.
60 2009-09-07  Gary Wong  <gtw@gnu.org>
62         * decorate-core.c (handle_get_default_map): We want the property
63         length in format units, not bytes.
64         * decorate-render.c (handle_get_default_map): Likewise.
66 2009-09-07  Gary Wong  <gtw@gnu.org>
68         * gwm.c (setup_display): Add _NET_SUPPORTING_WM_CHECK property to
69         fake window.
71 2009-09-06  Gary Wong  <gtw@gnu.org>
73         * frame.c (update_frame_extents): New function.
74         * gwm.c (start_managing_window): Update _NET_FRAME_EXTENTS property.
75         * managed.c (managed_property_change): Likewise.
77 2009-09-06  Gary Wong  <gtw@gnu.org>
79         * gwm.c (setup_display): Add various EWMH properties to the root
80         and fake windows.
81         (shutdown_display): Remove EWMH root properties.
83 2009-09-06  Gary Wong  <gtw@gnu.org>
85         * decorate-core.c (core_replace_icons): New function.
86         * decorate-render.c (render_picture, assemble_image)
87         (render_replace_icons): New functions.
88         (render_update_window): Draw icons in menus where requested.
89         (decorate_render_init): Look for suitable PictFormats.
90         * gwm.c (start_managing_window): Initialise icons.
91         (unmanage_window): Deallocate icons.
92         (setup_display): Add _NET_WM_ICON property.
94         * managed.c (handle_managed_get_property, async_get_property): Use
95         the window resource ID instead of a pointer to identify the window,
96         to detect if it disappears asynchronously.
97         (handle_get_geometry): New function.
98         (managed_property_change): Handle _NET_WM_ICON, and the icon
99         parameters of WM_HINTS.
100         * menu.c (popup_menu): Allow icons in menus.
101         * actions.c (action_window_list_menu): Add icons to menu.
103 2009-09-03  Gary Wong  <gtw@gnu.org>
105         * decorate-core.c (core_text): Use utf8_next().
106         (core_window_size): Use utf8_length().
108 2009-09-02  Gary Wong  <gtw@gnu.org>
110         * utf8.c (utf8_illegal, utf8_length, utf8_next)
111         (utf8_dup_valid, utf8_dup_valid_len, dup_valid_common): New functions.
112         (to_utf8) [DEBUG]: Add sanity checks.
113         * decorate-render.c (render_text): Use utf8_length() and utf8_next().
114         (text_width): Use utf8_next().
115         * managed.c (managed_property_change): Use utf8_dup_valid_len().
117         * frame.c (recalc_size): Avoid needless C99isms.
118         * gwm.c (place_window): Likewise.
119         * window-table.c (table_hash): Likewise.
121 2009-09-01  Gary Wong  <gtw@gnu.org>
123         * actions.c (action_map_raise, action_window_list_menu)
124         (action_exit, window_list_activate): New functions.
125         * gwm.c (main): Use which_signal -1 to indicate a graceful exit.
127         * menu.c (menu_button_release, popup_menu): Remember the window
128         parameter by resource ID, instead of by pointer.  That way, it is
129         simple to detect whether the window has been destroyed between
130         creation and activation of the menu.
132         * menu.c (menu_enter_notify): Don't try to measure the active item
133         when nothing is active.
135         * menu.c (destroy_menu): Don't free NULL labels.
136         (popup_menu): Don't strdup() NULL labels.
138 2009-09-01  Gary Wong  <gtw@gnu.org>
140         * actions.c (action_iconify_window, action_deiconify_window): New
141         functions.
142         * keyboard.c (establish_grabs): Replace NUM_KEY_ACTIONS with new
143         num_key_actions symbol.
144         * managed.c (set_managed_state, iconic_to_normal): Moved from gwm.c.
145         (normal_to_iconic): New function.
146         * gwm.c (handle_client_message): Use new normal_to_iconic() function.
147         * root.c (root_key_press): Likewise.
149 2009-09-01  Gary Wong  <gtw@gnu.org>
151         * menu.c, menu.h: New files.
152         * actions.c: Added callback parameter to all actions.  All callers
153         changed.
154         (action_root_menu, action_window_menu): New functions.
155         * decorate-core.c (core_update_window): Draw menu items.
156         (core_window_size): New function.
157         * decorate-render.c (render_update_window): Draw menu items.
158         (text_width, render_window_size): New functions.
159         * frame.c (recalc_size): Call window_size() to obtain feedback
160         dimensions.
161         (frame_button_press): Pop up a menu on button 2 presses.
162         * gwm.c (show_window): Annotate menu windows.
163         (setup_display): Initialise window_size.
164         (start_managing_window): Add OwnerGrabButton to frame windows.
165         (setup_display): Add OwnerGrabButton to the roots.
167 2009-09-01  Gary Wong  <gtw@gnu.org>
169         * gwm.c (handle_events): Replace passive_grab with pointer_demux,
170         which redirects events on the client side.
171         (start_managing_window): Set initial event mask for
172         the frame button window, instead of an explicit GrabButton.
173         * button.c (button_button_press, button_button_release): Use
174         pointer_demux instead of GrabButton.
175         (button_enter_notify, button_leave_notify): Inspect event parameters
176         to determine which window is entered/left.
177         * frame.c (frame_button_press, frame_button_release): Use
178         pointer_demux instead of passive_grab.
179         (frame_motion_notify, frame_destroy_notify): Likewise.
180         (frame_enter_notify): Ignore events when pointer_demux is set.
181         * window-table.c (forget_window): Remove pointer_demux from
182         forgotten windows.
184 2009-08-31  Gary Wong  <gtw@gnu.org>
186         * gwm.c (show_atom): Declare predefined_names[] as const.
187         (show_error): Declare render_strings[] as const.
188         (show_event): Declare event_names[] as const.
189         (setup_display): Use auto storage class for wm_atom_str.
191 2009-08-31  Gary Wong  <gtw@gnu.org>
193         * gwm.c (start_managing_window): Create "border region" input-only
194         windows, to allow setting different cursors on various border parts.
196         * frame.c (frame_configure_notify): Update the geometry of the
197         border regions.
198         * decorate-core.c (decorate_core_init): Cursor indices were rearranged.
199         * decorate-render.c (decorate_compat_init): Likewise.
201         * frame.c (frame_button_press): Do not recognise a passive grab
202         propagated from the client.
204 2009-08-31  Gary Wong  <gtw@gnu.org>
206         * frame.c (frame_t, frame_xb): Make window decorations optional.
207         (frame_blr): New function.
208         (frame_b, frame_l, frame_r): Invoke frame_blr().
209         (deactivate_focus_frame): Moved from gwm.c.
210         (frame_button_press, frame_enter_notify): Make window decorations
211         optional.
212         * gwm.c (start_managing_window): Likewise.
213         (setup_display): Add _MOTIF_WM_HINTS property.
214         * managed.c (managed_property_change): Handle _MOTIF_WM_HINTS property.
215         (match_managed_shape): Retrieve _MOTIF_WM_HINTS when a client
216         window is no longer bounding shaped.
218 2009-08-31  Gary Wong  <gtw@gnu.org>
220         * button.c (button_size, button_xb): New functions.  All references
221         to former constants updated.
222         * frame.c (frame_t, frame_b, frame_l, frame_r, frame_xb): New
223         functions.  All references to former constants updated.
224         (translate_child_to_frame, translate_frame_to_child): Moved
225         from gwm.c.
226         (apply_size_constraints): Likewise.
228 2009-08-30  Gary Wong  <gtw@gnu.org>
230         * frame.c (frame_button_release): Ignore the event unless the
231         window was the one to establish the passive grab.
232         (frame_destroy_notify): New function.
234 2009-08-30  Gary Wong  <gtw@gnu.org>
236         * decorate-render.c (lookup_face): New function.
237         (query_metrics, query_glyph, replace_glyph, render_text): Take style
238         into consideration.
239         (render_update_window): Use styles, as appropriate.
240         (decorate_render_init): Remember fontconfig charsets and patterns
241         for each face in each style.
242         (decorate_render_done): Clean up fontconfig charsets and patterns.
244 2009-08-29  Gary Wong  <gtw@gnu.org>
246         * frame.c (build_edges): Use xmalloc() instead of malloc().
248 2009-08-29  Gary Wong  <gtw@gnu.org>
250         * managed.c (managed_property_change): Use _NET_WM_NAME in preference
251         to WM_NAME.
252         (async_get_property): New function.
253         (managed_property_notify): Use async_get_property.
254         * gwm.c (start_managing_window): Initialise net_wm_name.
255         (setup_display): Add _NET_WM_NAME property.
257 2009-08-28  Gary Wong  <gtw@gnu.org>
259         * frame.c (recalc_size): Initialise feedback->u.feedback.
261 2009-08-28  Gary Wong  <gtw@gnu.org>
263         * gwm.c (unmanage_window): Put the parent of the unmanaged child
264         into a childless state, so that lingering events can be handled
265         correctly.
266         (handle_destroy_window): New function.
267         (show_window): Annotate childless windows.
268         * managed.c (withdrawn_map_request, withdrawn_configure_request): New
269         functions.
271 2009-08-28  Gary Wong  <gtw@gnu.org>
273         * decorate-render.c (decorate_render_init): Cast FONT_NAME
274         to (FcChar8 *).
276 2009-08-28  Gary Wong  <gtw@gnu.org>
278         * gwm.c (shutdown_display): Reparent the windows in strict stacking
279         order.
281 2009-08-28  Gary Wong  <gtw@gnu.org>
283         * decorate-render.c (query_metrics, render_text, render_update_window,
284         decorate_render_init): Replace FONT_FAMILY, FONT_WEIGHT,
285         FONT_PIXEL_SIZE, FONT_LOAD_TARGET with FONT_NAME.
287 2009-08-28  Gary Wong  <gtw@gnu.org>
289         * decorate-render.c (query_metrics, replace_glyph): Don't
290         bother comparing the first cache line with itself.
292 2009-08-27  Gary Wong  <gtw@gnu.org>
294         * decorate-render.c, decorate-render.h: New files.  Implement
295         window decoration with RENDER extension (text only, so far).
296         * gwm.c (setup_display, shutdown_display): Set up and clean up
297         RENDER extension when available.
298         (show_error): Show RENDER errors.
300         * decorate-core.c (core_update_window): Issue SetClipRectangles
301         request.
303 2009-08-27  Gary Wong  <gtw@gnu.org>
305         * gwm.c (sync_with_callback): Perform the sequence comparison
306         with unsigned arithmetic, so that overflow semantics are
307         well-defined.
309 2009-08-27  Gary Wong  <gtw@gnu.org>
311         * frame.c (recalc_size): Implement edge resistance when resizing
312         frames.
313         (edge_resist): New function.
315 2009-08-26  Gary Wong  <gtw@gnu.org>
317         * frame.c (frame_motion_notify, frame_button_release): Implement
318         edge resistance when moving frames.
319         (build_edges, free_edges, h_edge_compare, v_edge_compare): New
320         functions.
322 2009-08-25  Gary Wong  <gtw@gnu.org>
324         * frame.c (frame_motion_notify): Ignore single pixel movements, and
325         account for window border.
327 2009-08-25  Gary Wong  <gtw@gnu.org>
329         * window-table.c (queue_window_update): Mark the update box as
330         uncleared if we enlarge the bounding box.
332 2009-08-25  Gary Wong  <gtw@gnu.org>
334         * gwm.c, gwm.h (warning, fatal): Export warning and fatal functions.
336 2009-08-25  Gary Wong  <gtw@gnu.org>
338         * window-table.c (queue_window_update): Properly compute the
339         update region when the old region was empty.
341 2009-08-24  Gary Wong  <gtw@gnu.org>
343         * gwm.c (shutdown_display) [DEBUG]: Call muntrace() only when
344         [HAVE_MTRACE].
346 2009-08-23  Gary Wong  <gtw@gnu.org>
348         * managed.c (managed_shape_notify): Respond to ShapeNotify events
349         only when they describe modifications to the bounding region.
351 2009-08-22  Gary Wong  <gtw@gnu.org>
353         * gwm.c (start_managing_window): Send a synthetic ConfigureNotify
354         to the client, because we've almost certainly moved their window.
356 2009-08-22  Gary Wong  <gtw@gnu.org>
358         * actions.c, actions.h, button.c, button.h, decorate-core.c,
359         decorate-core.h, frame.c, frame.h, gwm.c, gwm.h, keyboard.c,
360         keyboard.h, managed.c, managed.h, root.c, root.h, utf8.c, utf8.h,
361         window-table.c, window-table.h, Makefile.am, configure.ac: New
362         files, and version 1.0 release.