Age | Commit message (Collapse) | Author | Files | Lines |
|
The helps when testing changes to a libxcwm-based WM, as you don't need to
restart the clients to see the effect.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
xcwm_window_configure() has width and height parameters in the opposite order to
the order used everywhere else.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
contacted
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
xcb-util-wm commit 23a4eb6059e0a694e342c3ff41ab076dad50b745, present in 0.3.9,
changes the xcb_ewmh_set_supporting_wm_check() API. Update for that and require
xcb-util-wm 0.3.9
Use the updated xcb_ewmh_set_supporting_wm_check() to more correctly implement
EWMH, setting the _NET_SUPPORTING_WM_CHECK property on the root *and* child
window.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Also, make debug output for injected input events a bit clearer
Also, add button number to xcwm_input_mouse_button_event debug output
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Also keep a few Apple specific patterns
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Install a pkg-config .pc file, along with the library and headers
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
"Use -no-undefined to assure libtool that the library has no unresolved symbols
at link time, so that libtool will build a shared library on platforms that
require that all symbols are resolved when the library is linked."
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
The initial damage event for override-redirect windows are reported
relative to screen, not window. This initial damage is removed, and
then the whole window is marked as damaged (using window relative
coordinates).
Override-redirect can also report damage events with an incorrect
height. This case is treated the same as the initial damage event.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Created keyboard.h/.c which contain functions for setting keyboard
mapping and modifier mapping. Added these files to the build process.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Modifer keymap is built in XtoQBuildModifierMaps() taking advantage of
existing logic to determine keysyms in key map.
Call to xcb_set_modifier_mapping() added to set mapping of modifiers.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Added xcwm_window_state_t enum for the window states supported by
library.
_xcwm_atoms_set_wm_state() updated to use xcwm_window_state_t as
param. Also, _xcwm_atoms_set_wm_state sets the _NET_WM_STATE atom to
_NET_WM_STATE_HIDDEN when window is made iconic, and removes it when
window is de-iconified.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
|
|
Handlers added for Xtoq window miniaturization (iconify) and
de-miniaturization (de-iconify). Calls xcwm_window_iconify() and
xcwm_window_deiconify() to update window state.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
A wm_state_atom field added to xcwm_atoms_t and value determined on
atom init.
Functions to change state to Iconic or Normal added to window.c and
atoms.c. Functions in window.c are wrappers for the atoms.c
functions. The window.c functions are to be called by window manager
when window is iconified or de-iconified.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
In libxcwm, WM_NAME atom retrieved and added to the xcwm_atoms_t
structure for context.
_xcwm_atoms_set_window_name() now checks _NET_WM_NAME first, before WM_NAME.
XCWM_EVENT_WINDOW_NAME event added to enum. In event loop, event of
type XCB_PROPERTY_NOTIFY is checked to see if atom matches
_NET_WM_NAME or WM_NAME. If so, event sent to xtoq.
Function to handle update to window name added to XtoqController.m and
case for XCWM_EVENT_WINDOW_NAME added to eventHandler().
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
ICCCM WM_TRANSIENT_FOR atoms is checked, and if set, window is set to
XCWM_WINDOW_TYPE_DIALOG, otherwise XCWM_WINDOW_TYPE_NORMAL. Then the
EWMH _NET_WINDOW_TYPE atoms is checked, if set, type is determined
from its value - otherwise previous value is used.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Removed a call to xcb_key_symbols_alloc() that serves no
purpose. Believe left over from test code that has since been removed.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddlestone Seqouia <jeremyhu@apple.com>
|
|
Creating a window that is never mapped, but has name of EWMH compliant
window manager and has _NET_SUPPORTING_WM_CHECK set to its ID on both
itself and the root window.
As specified in the EWMH spec:
http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#id2577320
_xcwm_atoms_init now returns 0 on success, or XCB error code if atom initialization
fails or if another EWMH compliant window manager is running.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddlestone Sequoia <jeremyhu@apple.com>
|
|
Initializing of EWMH atoms done through xcb_ewmh_init_atoms() and
xcb_ewmh_init_atoms_replies(). This populates a structure,
xcb_ewmh_connection_t with the values for all EWMH atoms and the
WM_PROTOCOLS atom.
xcb_ewmh_connection_t added to xcwm_wm_atoms_t, and wm_protocols_atom
removed.
Value for the connection's screen added to xcwm_context_t, as it is
used in initializing xcb_ewmh_connection_t.
Added _xcwm_atoms_release() to handle cleaning up the
xcb_ewmh_connection_t in context.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddlestone Seqouia <jeremyhu@apple.com>
|
|
Created an atoms.c file to hold functions that deal with initializing
and getting and setting data from ICCCM atoms. Moved functions from
window.c and init.c that handle ICCCM atoms into this file.
atoms.c added to Makefile.am
Removed global xcwm_wm_atoms_t _wm_atoms variable and placed in
xcwm_context_t as xcwm_context_t *atoms. Updated references so they
now point to context->atoms. Allocation memory for struct in context
initalization and freeing in xcwm_context_close().
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddlestone Seqouia <jeremyhu@apple.com>
|
|
Press and release of modifier keys are not passed by NSKeyUp or
NSKeyDown events, but in NSFlagsChanged. Added an NSFlagsChanged case
to the sendEvent switch.
The modifier flags of the event are checked against the current set of
modifier flags to determine if the modifier key, as specified in the
event's keyCode, has been pressed or released. Keycode is then sent on
to keyUp/DownInView handler.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
The position of the window on the X server was being set incorrectly,
creating a difference in positions between OS X window position and X
server position.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
|
|
The configure requests for unmanaged windows are passed on and
accepted with a call to xcb_configure_window in _xcwm_resize_window.
Added x and y position information to _xcwm_resize_window and its call
to xcb_configure_window.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
|
|
Windows may set WM_DELETE after being mapped, so
XCB_EVENT_MASK_PROPERTY_CHANGE event mask set on all newly created
windows so we can get notification. XCB_PROPERTY_NOTIFY case added to
event loop to catch propery change events.
In window.c set_wm_delete_win_in_context changed to
_xcwm_window_set_wm_delete as it is now a function that is called
across modules.
XCB_PROPERTY_NOTIFY handles case where WM_PROTOCOLS has changed, then
calls _xcwm_window_set_wm_delete to determine if WM_DELETE atom has
changed.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
|
|
Missing paren was in memset statement for window sizing struct.
Removed memset statement, moved memory allocation for xcwm_window_t
sizing to xcwm_window_create() and changed to calloc to 0 fill
xcwm_sizing_t structure.
Properly freeing memory for window sizing struct in xcwm_window_release.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
On window creation, XtoQ gets the sizing data for the window and sets
the resizing increments, max size, and min size of the window.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Calls to get atoms were previously using preset numbers. strlen guards
against atom name and length getting out of sync.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Getting values of ICCCM properties has been changed to use the
xcb_icccm.h functions available to simplify library code.
On receiving a mapping event, WM_TRANSIENT_FOR and WM_SIZE_HINTS for
window are checked for the window, and values in xcwm_window_t are
set.
Enumeration added for different EWMH window types, currently only
XCWM_WINDOW_TYPE_DIALOG and XCWM_WINDOW_TYPE_NORMAL are used. A
xcwm_sizing_t structure was added to hold WM_SIZE_HINT data for the
window.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Added keymap_main.c to function as driver for keymap.c code. main in
keymap_main.c takes display to connect to on command line, opens
connection and passes the connection on to the keymap.c code through
XtoQKeymapReSync.
Added build target to src/xtoq/Makefile.am to build stand alone
application.
In keymap.c, XtoQKeymapReSync and XtoQKeyboardReloadHandler now take
xcb_connection_t as parameter.
XtoQKeyboardReloadHandler uses call to
xcb_change_keyboard_mapping_checked to send keyymap with proper
keysyms to X server.
References to KeySyms changed to xcb_keysym_t for compatibility with
xcb_change_keyboard_mapping_checked.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Also removed xcwm_context_t from xcwm_event_t and accessor functions.
Context available through window.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Awkward circular assignment, but it addresses issue where window
manager client may ask for the xcwm_context_t of the root window.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
On window creation, XtoQ checks xcwm_window_is_override_redirect() and
if it returns true, creates window with no decorations.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Creation of override-redirect windows are done through XCB_MAP_NOTIFY,
and removal through XCB_UNMAP_NOTIFY so cases for these events have
been added to event_loop.c::run_event_loop.c
Override_redirect and inital_damage flags added to xcwm_window_t
struct.
_xcwm_window_created changed present tense _xcwm_window_create. Check
of window attributes sets override_redirect and initial_damage flags
to "1" if window is determined to be override-redirect.
Accessor function xcwm_window_is_override_redirect() added to allow
window manager to determine if window is/isn't an override-redirect
window.
_xcwm_destroy_window generalized to _xcwm_window_remove which is
called by XCB_UNMAP_NOTIFY and XCB_DESTROY_NOTIFY events.
Alteration to handing damage event to in
event_loop.c::run_event_loop(). Initial damage events to
override-redirect windows are reported relative to the root window -
not relative to the window itself. The "initial_damage" and
"override_redirect" flags in xcwm_window_t is used to determine if the
damage event is the first damage event for an override-redirect
window. If this is the case, the coordinates of the damage area of the
window are translated to window relative coordinates before the event
is passed on to the window manager client. This allows the client to
grab the correct window pixmap when it calls
xcwm_image_copy_damaged().
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Commented out the code that kills the X server, since it is using a
sledgehammer approach that kills *every* running instance of Xorg.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Fixed error in translation of X server coordinates to OS X
coordinates. Windows were being reported at incorect positions.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Added NS*MouseDragged event cases to sendEvent() in same case as
NSMouseMoved so mouse movements during drags are reported to X server
like NSMouseMoved events.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Changed the comments and removed/commented out printfs for
XCB_CONFIGURE_NOTIFY and XCB_MOTION_NOTIFY cases in run_event_loop().
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Because xcwm_image_copy_full retrevies the window image in window
relative coordinates, x & y should be 0. Was using the root relative
x,y.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
xcwm_image_copy_* return NULL if call to xcb_image_get fails to return
a valid image.
xcwm_image_copy_damaged returns NULL if damage area has no width or height.
Checks for NULL image added to XtoqView draw.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Memory for the window allocated by library is freed in
_xcwm_window_release, which is called after the client has done any
clean up it needs to do on its side.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Both xcwm_context_t and xcwm_window_t have accessor functions for
fields that client may need access to. Changed xtoq code to refer to
struct fields through the accessor functions.
Added xcwm_rect_t struct to hold information for window and window
damage areas.
Created xcwm_rect_t to hold geometry information for windows and
damage areas. This structure is not opaque.
Asserts added were memory for window and window rects allocated.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Also prefixed public input.c, image.c and window.c functions with
xcwm_input_*, xcwm_window_* and xcwm_image_*. Fixed some remaining
issues with functions that were requiring both a context and window.
Renamed data.h to context.h and xcwm.c to context.c - placed code in
context, window, and image. Added image.c and context.c to
Makefile.am.
Removed data.h from project and references to it. The struct
definitions previously in data.h have been moved into other files.
Renamed xcwm_image_get_* to xcwm_image_copy_*.
Changed calls in xtoq code to new function names.
Definition of xcwm_window_t moved to window.h
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
Reviewed by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
|
|
The xcwm_window_t now holds the xcwm_context_t that its associated
with. Changed functions that required a window and a context to only
take a window.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
|
|
Conflicts:
include/xcwm/xtoq.h
src/libxcwm/context_list.c
src/libxcwm/event_loop.c
src/libxcwm/init.c
src/libxcwm/input.c
src/libxcwm/window.c
src/libxcwm/xcwm.c
src/libxcwm/xcwm_internal.h
src/xtoq/XtoqApplication.h
src/xtoq/XtoqApplication.m
src/xtoq/XtoqController.h
src/xtoq/XtoqController.m
src/xtoq/XtoqImageRep.m
src/xtoq/XtoqView.h
src/xtoq/XtoqView.m
src/xtoq/XtoqWindow.h
src/xtoq/XtoqWindow.m
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
xcwm_context_t is now broken into xcwm_context_t which holds
connection data, and xcwm_window_t which holds window specific data.
Signed-off-by: Jess VanDerwalker <washu@sonic.net>
|