gri3-wm/testcases/t
Marco Hunsicker 00ee86de79 Send IPC window events for focus and title changes
This patch fixes ticket #1168 to extend the window IPC event mechanism
to send IPC events for window focus and title changes. The newly added
window events use the same format as the already established "new"
event.

Specifically this patch:

* Moves the ipc_send_window_event() function from src/manage.c into
  src/ipc.c and adds an argument for the change property of the event
* Updates src/manage.c to use the new function signature. To ensure
  that the "new" event does not send the same event data as the
  "focus" event, setting focus now happens after the "new" event
  has been sent
* Adds IPC focus event notification to src/x.c. To workaround a problem
  during window close when accessing the window name, a function has been
  added to query whether a window is actually attached to its parent. To
  avoid obsolete focus notification, a new field has been added to keep
  track of the focus without any interference by the click handling
* Adds IPC title event notification to src/handlers.c. To avoid
  obsolete title notification, a function has been added to determine
  whether a window title has actually changed
* Updates the IPC documentation to include the new events
* Updates testcases/t/205-ipc-windows.t to include the "focus" event
  in order to ensure the correct event sequence
* Adds two new unit tests, b/testcases/t/219-ipc-window-focus.t and
  b/testcases/t/220-ipc-window-title.t to ensure proper "focus" and
 "title" events
2014-02-26 22:24:19 +01:00
..
000-load-deps.t tests: 000-load-deps: bail out when dependencies are not found, test more of them 2012-11-13 21:03:44 +01:00
001-tile.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
002-i3-sync.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
003-ipc.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
004-unmanaged.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
005-floating.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
100-fullscreen.t GET_TREE: serialize container type into a string 2013-12-22 21:52:49 +01:00
101-focus.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
102-dock.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
103-move.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
104-focus-stack.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
105-stacking.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
111-goto.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
112-floating-resize.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
113-urgent.t tests: fix setting the urgency hint 2013-09-24 06:36:08 +02:00
114-client-leader.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
115-ipc-workspaces.t tests: 115-ipc-workspaces: ensure the i3 ipc socket is connected 2012-11-13 21:03:25 +01:00
116-nestedcons.t GET_TREE: serialize container type into a string 2013-12-22 21:52:49 +01:00
117-workspace.t GET_TREE: serialize container type into a string 2013-12-22 21:52:49 +01:00
118-openkill.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
119-match.t tests: move set_wm_class to X11::XCB::Window 2013-09-24 21:56:52 +02:00
120-multiple-cmds.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
121-next-prev.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
122-split.t GET_TREE: serialize container type into a string 2013-12-22 21:52:49 +01:00
124-move.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
126-regress-close.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
127-regress-floating-parent.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
128-open-order.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
129-focus-after-close.t previous commit: extend test and code to also work with floating windows 2013-10-13 17:59:29 +02:00
130-close-empty-split.t t/130-close-empty-split: clean up old workspace 2014-02-13 21:05:42 +01:00
131-stacking-order.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
132-move-workspace.t tests: sync_with_i3 before warping pointer 2014-02-25 20:44:17 +01:00
133-size-hints.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
134-invalid-command.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
135-floating-focus.t Skip floating cons in focus (child|parent) and stop them from being split 2012-10-16 20:01:36 +02:00
136-floating-ws-empty.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
137-floating-unmap.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
138-floating-attach.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
139-ws-numbers.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
140-focus-lost.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
141-resize.t Make the resize command honor criteria (Thanks Tblue) 2012-09-28 20:36:25 +02:00
142-regress-move-floating.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
143-regress-floating-restart.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
144-regress-floating-resize.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
145-flattening.t Bugfix: don’t flatten tabbed/stacked containers 2013-09-01 13:35:04 +02:00
146-floating-reinsert.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
147-regress-floatingmove.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
148-regress-floatingmovews.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
150-regress-dock-restart.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
151-regress-float-size.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
152-regress-level-up.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
153-floating-originalsize.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
154-regress-multiple-dock.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
155-floating-split-size.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
156-fullscreen-focus.t tests: sync_with_i3 before warping pointer 2014-02-25 20:44:17 +01:00
158-wm_take_focus.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
159-socketpaths.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
161-regress-borders-restart.t Implement variable border widths for pixel/normal 2012-09-24 22:20:29 +02:00
162-regress-dock-urgent.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
163-wm-state.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
164-kill-win-vs-client.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
165-for_window.t tests: move set_wm_class to X11::XCB::Window 2013-09-24 21:56:52 +02:00
166-assign.t tests: move set_wm_class to X11::XCB::Window 2013-09-24 21:56:52 +02:00
167-workspace_layout.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
168-regress-fullscreen-restart.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
169-border-toggle.t Fix 'border toggle' (it "skipped" 1px border) (Thanks joepd) 2012-09-28 19:29:14 +02:00
170-force_focus_wrapping.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
171-config-migrate.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
172-start-on-named-ws.t tests: update t/172-start-on-named-ws.t to check the previous commit 2013-06-29 20:58:33 +02:00
173-get-marks.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
173-regress-focus-assign.t tests: move set_wm_class to X11::XCB::Window 2013-09-24 21:56:52 +02:00
174-border-config.t Implement variable border widths for pixel/normal 2012-09-24 22:20:29 +02:00
174-regress-focus-toggle.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
175-startup-notification.t t/175-startup-notification: use the testcases X11 connection 2012-12-27 18:02:23 +01:00
176-workspace-baf.t Merge branch 'master' into next 2012-11-10 09:01:24 +01:00
177-bar-config.t Add new bar.binding_mode_indicator configuration. 2013-09-24 06:59:26 +02:00
178-regress-workspace-open.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
179-regress-multiple-ws.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
180-fd-leaks.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
181-regress-float-border.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
182-regress-focus-dock.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
183-config-variables.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
184-regress-float-split-resize.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
185-scratchpad.t GET_TREE: serialize container type into a string 2013-12-22 21:52:49 +01:00
186-regress-assign-focus-parent.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
187-commands-parser.t Fix command parser: resizing tiling windows 2013-10-13 18:02:40 +02:00
188-regress-focus-restart.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
189-floating-constraints.t t/189-floating-constraints: sync before getting window rects 2012-12-26 22:03:37 +01:00
190-scratchpad-diff-ws.t tests: move set_wm_class to X11::XCB::Window 2013-09-24 21:56:52 +02:00
191-resize-levels.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
192-layout.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
193-ipc-version.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
194-regress-floating-size.t Bugfix: fix floating window size with hide_edge_borders (+test) 2013-04-02 23:59:26 +02:00
195-net-active-window.t Bugfix: ignore _NET_ACTIVE_WINDOW for scratchpad windows (Thanks mistnim) 2013-12-21 21:32:23 +01:00
196-randr-output-names.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
197-regression-move-vanish.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
198-regression-scratchpad-crash.t tests: add missing boilerplate 2012-09-22 12:56:01 +02:00
199-ipc-mode-event.t tests: add testcase for the 'mode' IPC event 2012-09-22 13:20:53 +02:00
200-urgency-timer.t tests: fix setting the urgency hint 2013-09-24 06:36:08 +02:00
201-config-parser.t Add new bar.binding_mode_indicator configuration. 2013-09-24 06:59:26 +02:00
202-scratchpad-criteria.t bugfix: Resize and center a scratchpad even when a criteria is used. 2013-07-11 21:18:21 +02:00
203-regress-assign-and-move.t tests: move set_wm_class to X11::XCB::Window 2013-09-24 21:56:52 +02:00
204-regress-scratchpad-move.t tests: move set_wm_class to X11::XCB::Window 2013-09-24 21:56:52 +02:00
205-ipc-windows.t Send IPC window events for focus and title changes 2014-02-26 22:24:19 +01:00
206-fullscreen-scratchpad.t Fix problem when moving fullscreen window to scratchpad 2013-05-25 22:59:27 +02:00
207-shmlog.t add a testcase for the shmlog command 2013-06-23 22:14:59 +02:00
208-regress-floating-criteria.t tests: move set_wm_class to X11::XCB::Window 2013-09-24 21:56:52 +02:00
209-ewmh-net-workarea.t actively delete _NET_WORKAREA on startup 2013-07-13 12:24:15 +02:00
210-mark-unmark.t implement unmark command 2013-07-17 23:02:31 +02:00
211-regress-urgency-assign.t tests: move set_wm_class to X11::XCB::Window 2013-09-24 21:56:52 +02:00
212-assign-urgency.t Assigned windows open urgent when not visible 2013-10-19 10:07:24 +02:00
213-layout-restore-simple.t allow parsing multiple nodes from a json layout 2013-12-22 21:52:49 +01:00
213-move-branch-position.t Movement into a branch considers movement direction 2014-01-06 22:26:23 +01:00
214-layout-restore-criteria.t fix test after renaming role to window_role 2013-12-22 21:52:49 +01:00
215-layout-restore-crash.t t/215-layout-restore-crash: fix test description 2014-01-04 21:57:35 +01:00
216-layout-restore-split-swallows.t add testcase for #1149 2014-01-05 20:37:42 +01:00
217-NET_CURRENT_DESKTOP.t Set EWMH desktop properties on startup. 2014-02-08 20:38:16 +01:00
218-regress-floating-split.t Bugfix: `tree_split` should not split floating cons 2014-02-08 20:59:23 +01:00
219-ipc-window-focus.t Send IPC window events for focus and title changes 2014-02-26 22:24:19 +01:00
220-ipc-window-title.t Send IPC window events for focus and title changes 2014-02-26 22:24:19 +01:00
500-multi-monitor.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
501-scratchpad.t add boilerplate to all testcases with documentation references 2012-09-10 14:09:01 +02:00
502-focus-output.t tests: sync_with_i3 before warping pointer 2014-02-25 20:44:17 +01:00
503-workspace.t tests: sync_with_i3 before warping pointer 2014-02-25 20:44:17 +01:00
504-move-workspace-to-output.t GET_TREE: serialize container type into a string 2013-12-22 21:52:49 +01:00
505-scratchpad-resolution.t tests: sync_with_i3 before warping pointer 2014-02-25 20:44:17 +01:00
506-focus-right.t tests: sync_with_i3 before warping pointer 2014-02-25 20:44:17 +01:00
507-workspace-move-crash.t Bugfix: with one ws per output, don’t crash on cross-output moves (Thanks moju) 2012-09-28 23:04:37 +02:00
509-workspace_layout.t set workspace_layout in create_workspace_on_output 2012-10-03 15:08:21 +02:00
510-focus-across-outputs.t tests: sync_with_i3 before warping pointer 2014-02-25 20:44:17 +01:00
511-scratchpad-configure-request.t Bugfix: Ignore ConfigureRequests for scratchpad windows (Thanks MeanEYE) 2012-12-22 14:08:11 +01:00
512-move-wraps.t Bugfix: Do not move focus if a container is moved across outputs 2013-02-10 17:38:17 +01:00
513-move-workspace.t GET_TREE: serialize container type into a string 2013-12-22 21:52:49 +01:00
514-ipc-workspace-multi-monitor.t Refactor and improve test 514 2013-12-04 19:50:35 +01:00
515-create-workspace.t Respect workspace numbers when looking for a free workspace name 2013-08-18 17:47:53 +02:00
516-move.t t/516-move: use window id, fix typo 2013-11-19 20:28:32 +01:00
517-regress-move-direction-ipc.t Bugfix: `move <direction>` sends workspace focus 2014-01-13 23:36:31 +01:00