2014-05-15 Gary Wong * gwm.c (handle_crtc_info): Add missing indirection in *cc->ok. (fake_selection_request): Add missing assignment cp.p = p. 2014-05-14 Gary Wong * gwm.c (start_managing_window): Fix size of values array. 2014-05-08 Gary Wong * decorate-render.c (decorate_compat_init) [USE_CURSOR]: Load cursors via xcb_cursor_load_cursor (to honour cursor themes where available). 2012-02-01 Gary Wong * decorate-render.c (decorate_render_init): Specify property size in 32-bit units, not bytes. 2012-01-30 Gary Wong * managed.c (managed_property_change): Ignore invalid size increment hints. 2010-11-09 Gary Wong * gwm.c (show_error) [USE_RANDR]: Show RANDR errors. (update_crtc, handle_crtc_info) [USE_RANDR]: New functions. (setup_display) [USE_RANDR]: Query CRTC information, if possible. * root.c (root_configure_notify): Handle screen size changes. (root_rr_crtc_change_notify) [USE_RANDR]: New function. * frame.c (build_edges) [USE_RANDR]: Add CRTC edges to list. * menu.c (fit_menu): New function. * gwm.c (point_live, make_area_live): New functions. (place_window) [USE_RANDR]: Keep windows within a CRTC, if possible. * actions.c (window_list_enter): Make windows live upon selection. (window_list_leave): Restore window position if it had been made live. 2010-11-05 Gary Wong * decorate-core.c (core_update_window): Ignore childless frames. * decorate-render.c (render_update_window): Likewise. 2010-11-01 Gary Wong * window-table.c (table_insert_index, stack_insert): Fix rehashing bug which could corrupt table sizes. 2010-06-01 Gary Wong * decorate-render.c (query_metrics): Don't try to load metrics for charsets that don't include the character. 2010-03-25 Gary Wong * utf8.c (to_utf8): Fix ISO 8859-1 to UTF-8 conversion. 2009-12-06 Gary Wong * root.c (root_reparent_notify): Handle cases where a window is "reparented" to its current parent. * window-table.c (stack_move_above): Treat moving a window above itself as a no-op. (stack_insert_singleton, stack_insert_above, stack_remove) (stack_move_above): Add extra assertions. 2009-09-11 Gary Wong * decorate-core.c (decorate_core_init): Moved to the initialisation section. * decorate-render.c (decorate_render_init, decorate_compat_init): Likewise. * window-table.c (table_init, stack_init): Likewise. * gwm.c (setup_display, unknown): Likewise. (init): New function. (main) [HAVE_INIT_SECTION]: Deallocate the initialisation section. 2009-09-10 Gary Wong * gwm.c (setup_display): Make sure the root event mask change is atomic with the query of its children. (shutdown_display): Process any remaining MapRequest, ConfigureRequest or CirculateRequest events before closing. 2009-09-09 Gary Wong * actions.c (action_window_list_menu): Insert windows into the menu by screen, in bottom-to-top stacking order. * frame.c (synthetic_configure_notify): Ignore Window errors on the SendEvent. 2009-09-08 Gary Wong * actions.c (window_list_enter, window_list_leave): New functions. (window_list_activate): Destroy the place holder window. (action_window_list_menu): Add enter and leave actions. * decorate-render.c (render_update_window): Look up menu item icons each time, in case the corresponding window has been destroyed. * frame.c (activate_focus_frame): New function. (frame_enter_notify): Call activate_focus_frame(). * menu.c (deactivate_menu_item): New function. (menu_enter_notify, menu_leave_notify): Invoke the menu item's enter and leave actions, if set. (popup_menu): Store the menu item enter and leave actions. * window-table.c (table_hash): Take the hash and size as parameters. All callers changed. (stack_init, stack_destroy, stack_lookup, stack_insert_new) (stack_rehash, stack_insert, stack_insert_new, stack_insert_singleton) (stack_insert_above, stack_remove, stack_move_above) (stack_real_below): New functions. * gwm.c (setup_display): Initialise window_stack, add SubstructureNotify to the root event masks, and add the roots and existing windows to the stack. (shutdown_display): Use the stored stacking order instead of querying it from the server. * root.c (root_create_notify, root_destroy_notify) (root_reparent_notify, root_configure_notify): New functions. * gwm.c (event_time): New function. 2009-09-07 Gary Wong * decorate-core.c (handle_get_default_map): We want the property length in format units, not bytes. * decorate-render.c (handle_get_default_map): Likewise. 2009-09-07 Gary Wong * gwm.c (setup_display): Add _NET_SUPPORTING_WM_CHECK property to fake window. 2009-09-06 Gary Wong * frame.c (update_frame_extents): New function. * gwm.c (start_managing_window): Update _NET_FRAME_EXTENTS property. * managed.c (managed_property_change): Likewise. 2009-09-06 Gary Wong * gwm.c (setup_display): Add various EWMH properties to the root and fake windows. (shutdown_display): Remove EWMH root properties. 2009-09-06 Gary Wong * decorate-core.c (core_replace_icons): New function. * decorate-render.c (render_picture, assemble_image) (render_replace_icons): New functions. (render_update_window): Draw icons in menus where requested. (decorate_render_init): Look for suitable PictFormats. * gwm.c (start_managing_window): Initialise icons. (unmanage_window): Deallocate icons. (setup_display): Add _NET_WM_ICON property. * managed.c (handle_managed_get_property, async_get_property): Use the window resource ID instead of a pointer to identify the window, to detect if it disappears asynchronously. (handle_get_geometry): New function. (managed_property_change): Handle _NET_WM_ICON, and the icon parameters of WM_HINTS. * menu.c (popup_menu): Allow icons in menus. * actions.c (action_window_list_menu): Add icons to menu. 2009-09-03 Gary Wong * decorate-core.c (core_text): Use utf8_next(). (core_window_size): Use utf8_length(). 2009-09-02 Gary Wong * utf8.c (utf8_illegal, utf8_length, utf8_next) (utf8_dup_valid, utf8_dup_valid_len, dup_valid_common): New functions. (to_utf8) [DEBUG]: Add sanity checks. * decorate-render.c (render_text): Use utf8_length() and utf8_next(). (text_width): Use utf8_next(). * managed.c (managed_property_change): Use utf8_dup_valid_len(). * frame.c (recalc_size): Avoid needless C99isms. * gwm.c (place_window): Likewise. * window-table.c (table_hash): Likewise. 2009-09-01 Gary Wong * actions.c (action_map_raise, action_window_list_menu) (action_exit, window_list_activate): New functions. * gwm.c (main): Use which_signal -1 to indicate a graceful exit. * menu.c (menu_button_release, popup_menu): Remember the window parameter by resource ID, instead of by pointer. That way, it is simple to detect whether the window has been destroyed between creation and activation of the menu. * menu.c (menu_enter_notify): Don't try to measure the active item when nothing is active. * menu.c (destroy_menu): Don't free NULL labels. (popup_menu): Don't strdup() NULL labels. 2009-09-01 Gary Wong * actions.c (action_iconify_window, action_deiconify_window): New functions. * keyboard.c (establish_grabs): Replace NUM_KEY_ACTIONS with new num_key_actions symbol. * managed.c (set_managed_state, iconic_to_normal): Moved from gwm.c. (normal_to_iconic): New function. * gwm.c (handle_client_message): Use new normal_to_iconic() function. * root.c (root_key_press): Likewise. 2009-09-01 Gary Wong * menu.c, menu.h: New files. * actions.c: Added callback parameter to all actions. All callers changed. (action_root_menu, action_window_menu): New functions. * decorate-core.c (core_update_window): Draw menu items. (core_window_size): New function. * decorate-render.c (render_update_window): Draw menu items. (text_width, render_window_size): New functions. * frame.c (recalc_size): Call window_size() to obtain feedback dimensions. (frame_button_press): Pop up a menu on button 2 presses. * gwm.c (show_window): Annotate menu windows. (setup_display): Initialise window_size. (start_managing_window): Add OwnerGrabButton to frame windows. (setup_display): Add OwnerGrabButton to the roots. 2009-09-01 Gary Wong * gwm.c (handle_events): Replace passive_grab with pointer_demux, which redirects events on the client side. (start_managing_window): Set initial event mask for the frame button window, instead of an explicit GrabButton. * button.c (button_button_press, button_button_release): Use pointer_demux instead of GrabButton. (button_enter_notify, button_leave_notify): Inspect event parameters to determine which window is entered/left. * frame.c (frame_button_press, frame_button_release): Use pointer_demux instead of passive_grab. (frame_motion_notify, frame_destroy_notify): Likewise. (frame_enter_notify): Ignore events when pointer_demux is set. * window-table.c (forget_window): Remove pointer_demux from forgotten windows. 2009-08-31 Gary Wong * gwm.c (show_atom): Declare predefined_names[] as const. (show_error): Declare render_strings[] as const. (show_event): Declare event_names[] as const. (setup_display): Use auto storage class for wm_atom_str. 2009-08-31 Gary Wong * gwm.c (start_managing_window): Create "border region" input-only windows, to allow setting different cursors on various border parts. * frame.c (frame_configure_notify): Update the geometry of the border regions. * decorate-core.c (decorate_core_init): Cursor indices were rearranged. * decorate-render.c (decorate_compat_init): Likewise. * frame.c (frame_button_press): Do not recognise a passive grab propagated from the client. 2009-08-31 Gary Wong * frame.c (frame_t, frame_xb): Make window decorations optional. (frame_blr): New function. (frame_b, frame_l, frame_r): Invoke frame_blr(). (deactivate_focus_frame): Moved from gwm.c. (frame_button_press, frame_enter_notify): Make window decorations optional. * gwm.c (start_managing_window): Likewise. (setup_display): Add _MOTIF_WM_HINTS property. * managed.c (managed_property_change): Handle _MOTIF_WM_HINTS property. (match_managed_shape): Retrieve _MOTIF_WM_HINTS when a client window is no longer bounding shaped. 2009-08-31 Gary Wong * button.c (button_size, button_xb): New functions. All references to former constants updated. * frame.c (frame_t, frame_b, frame_l, frame_r, frame_xb): New functions. All references to former constants updated. (translate_child_to_frame, translate_frame_to_child): Moved from gwm.c. (apply_size_constraints): Likewise. 2009-08-30 Gary Wong * frame.c (frame_button_release): Ignore the event unless the window was the one to establish the passive grab. (frame_destroy_notify): New function. 2009-08-30 Gary Wong * decorate-render.c (lookup_face): New function. (query_metrics, query_glyph, replace_glyph, render_text): Take style into consideration. (render_update_window): Use styles, as appropriate. (decorate_render_init): Remember fontconfig charsets and patterns for each face in each style. (decorate_render_done): Clean up fontconfig charsets and patterns. 2009-08-29 Gary Wong * frame.c (build_edges): Use xmalloc() instead of malloc(). 2009-08-29 Gary Wong * managed.c (managed_property_change): Use _NET_WM_NAME in preference to WM_NAME. (async_get_property): New function. (managed_property_notify): Use async_get_property. * gwm.c (start_managing_window): Initialise net_wm_name. (setup_display): Add _NET_WM_NAME property. 2009-08-28 Gary Wong * frame.c (recalc_size): Initialise feedback->u.feedback. 2009-08-28 Gary Wong * gwm.c (unmanage_window): Put the parent of the unmanaged child into a childless state, so that lingering events can be handled correctly. (handle_destroy_window): New function. (show_window): Annotate childless windows. * managed.c (withdrawn_map_request, withdrawn_configure_request): New functions. 2009-08-28 Gary Wong * decorate-render.c (decorate_render_init): Cast FONT_NAME to (FcChar8 *). 2009-08-28 Gary Wong * gwm.c (shutdown_display): Reparent the windows in strict stacking order. 2009-08-28 Gary Wong * decorate-render.c (query_metrics, render_text, render_update_window, decorate_render_init): Replace FONT_FAMILY, FONT_WEIGHT, FONT_PIXEL_SIZE, FONT_LOAD_TARGET with FONT_NAME. 2009-08-28 Gary Wong * decorate-render.c (query_metrics, replace_glyph): Don't bother comparing the first cache line with itself. 2009-08-27 Gary Wong * decorate-render.c, decorate-render.h: New files. Implement window decoration with RENDER extension (text only, so far). * gwm.c (setup_display, shutdown_display): Set up and clean up RENDER extension when available. (show_error): Show RENDER errors. * decorate-core.c (core_update_window): Issue SetClipRectangles request. 2009-08-27 Gary Wong * gwm.c (sync_with_callback): Perform the sequence comparison with unsigned arithmetic, so that overflow semantics are well-defined. 2009-08-27 Gary Wong * frame.c (recalc_size): Implement edge resistance when resizing frames. (edge_resist): New function. 2009-08-26 Gary Wong * frame.c (frame_motion_notify, frame_button_release): Implement edge resistance when moving frames. (build_edges, free_edges, h_edge_compare, v_edge_compare): New functions. 2009-08-25 Gary Wong * frame.c (frame_motion_notify): Ignore single pixel movements, and account for window border. 2009-08-25 Gary Wong * window-table.c (queue_window_update): Mark the update box as uncleared if we enlarge the bounding box. 2009-08-25 Gary Wong * gwm.c, gwm.h (warning, fatal): Export warning and fatal functions. 2009-08-25 Gary Wong * window-table.c (queue_window_update): Properly compute the update region when the old region was empty. 2009-08-24 Gary Wong * gwm.c (shutdown_display) [DEBUG]: Call muntrace() only when [HAVE_MTRACE]. 2009-08-23 Gary Wong * managed.c (managed_shape_notify): Respond to ShapeNotify events only when they describe modifications to the bounding region. 2009-08-22 Gary Wong * gwm.c (start_managing_window): Send a synthetic ConfigureNotify to the client, because we've almost certainly moved their window. 2009-08-22 Gary Wong * actions.c, actions.h, button.c, button.h, decorate-core.c, decorate-core.h, frame.c, frame.h, gwm.c, gwm.h, keyboard.c, keyboard.h, managed.c, managed.h, root.c, root.h, utf8.c, utf8.h, window-table.c, window-table.h, Makefile.am, configure.ac: New files, and version 1.0 release.