Commit Graph

920 Commits

Author SHA1 Message Date
Michael Stapelberg
cd2ee61ee8 fix some memory leaks when user passes command line arguments twice (Thanks Tiago) 2011-01-12 10:12:24 +01:00
Michael Stapelberg
a6f0dcd250 Fix switching to a workspace on a different output 2011-01-08 12:03:03 +01:00
Michael Stapelberg
83f6e445a0 Bugfix: Don’t use ->old_parent for floating cons (Thanks eelvex)
Instead, we attach them to their workspace when toggling back to tiling. This
makes more sense; afterall, floating clients are always directly below a
CT_WORKSPACE container.
2011-01-08 00:44:03 +01:00
Michael Stapelberg
0ea15ed962 fix a problem with workspace switching when the focus got to the target workspace
This could explain some strange effects where workspaces would just stay blank.
We’ll see.
2011-01-08 00:38:10 +01:00
Michael Stapelberg
54b9549713 Bugfix: Look for cons to focus *starting* at the ws, not beneath the ws (Thanks mseed)
This should fix #286.
2011-01-08 00:10:49 +01:00
Michael Stapelberg
e4bb6d859e Bugfix: Correctly maintain focus when setting a workspace to floating 2011-01-08 00:10:30 +01:00
Michael Stapelberg
b660769fe0 Bugfix: Correctly move to other workspaces when a floating window is focused on the target ws (Thanks mseed) 2011-01-07 23:56:32 +01:00
Michael Stapelberg
115462f103 Implement tree flattening to automatically solve situations of redundant chains of split containers
This should fix the move problems. See comment of tree_flatten() for a little
example.
2011-01-07 22:21:41 +01:00
Michael Stapelberg
228b5c51ff change many LOG/printf messages to use DLOG 2011-01-07 20:58:58 +01:00
Michael Stapelberg
186d2c7bfa ipc: change 'orientation' to human readable string instead of raw integer value 2011-01-07 20:48:01 +01:00
Michael Stapelberg
5ccd7b01e7 Bugfix: fix fullscreen mode for floating windows 2011-01-07 02:50:35 +01:00
Michael Stapelberg
55b6d31e4a Bugfix: randr: Don’t close container if it was not initialized before 2011-01-06 14:35:04 +01:00
Michael Stapelberg
2312187439 RandR: use the next unused workspace instead of fixed counting 2011-01-05 00:26:23 +01:00
Michael Stapelberg
f73c02ce92 Also initialize output->con when using neither RandR nor Xinerama 2011-01-05 00:19:51 +01:00
Michael Stapelberg
5098e45f23 Re-Implement support for RandR changes 2011-01-05 00:16:10 +01:00
Michael Stapelberg
f54ce1ddda retab! randr.c 2011-01-04 22:51:42 +01:00
Michael Stapelberg
1fb9b7c431 Bugfix: Correctly change focus after closing floating containers (Thanks litemotiv!) 2011-01-04 22:40:05 +01:00
Michael Stapelberg
0416be18df fix memleak: free struct Window members 2011-01-04 22:39:45 +01:00
Michael Stapelberg
bf2c18cc33 fix memleak: free X state structure 2011-01-04 22:39:24 +01:00
Michael Stapelberg
545566e6ba use sstrdup() instead of strdup() 2011-01-04 22:39:13 +01:00
Michael Stapelberg
80ecd157f6 fix memleak: free con->name before overwriting it 2011-01-04 22:38:33 +01:00
Michael Stapelberg
bdbda20293 cmdparse: free strings 2011-01-04 22:37:50 +01:00
Michael Stapelberg
fa44383cc6 fix small memory leak (unused ->name) 2011-01-04 22:15:52 +01:00
Michael Stapelberg
9713419327 Bugfix: Also change focus when the killed container was focused (Thanks fernandotcl) 2011-01-02 18:08:45 +01:00
Axel Wagner
aa422c07c4 Add forgetful restart to sighandler 2010-12-31 19:36:35 +01:00
Axel Wagner
6ec468ba1e Retab sighandler.c 2010-12-31 19:36:32 +01:00
Axel Wagner
fb6d117c42 Port sighandler to tree-branch 2010-12-31 19:36:29 +01:00
Michael Stapelberg
2d05c3a37d Fix dragging floating containers / click handling 2010-12-31 01:38:17 +01:00
Michael Stapelberg
daf00a932f For floating mode on workspace level, create a container around the content (Thanks Merovius)
Like when setting a workspace to stacked, we need to create a new container
around the content and set *that* to floating.
2010-12-30 23:09:18 +01:00
Michael Stapelberg
50914e0483 Bugfix: Correctly change focus when closing a split-container
The problem was i3 leaving an invalid focus pointer valid (after killing the
container) because the container itself is not mapped (if it has no x11 window,
for example split containers).
2010-12-30 23:01:58 +01:00
Michael Stapelberg
f65e4f5b16 Bugfix: Don’t redistribute resize percentage values when closing floating (!) windows (Thanks Merovius) (+testcase) 2010-12-30 02:39:14 +01:00
Michael Stapelberg
307c59bde6 Bugfix: Fix closing windows in tabbed mode with border_style == 1pixel / none 2010-12-28 19:54:56 +01:00
Michael Stapelberg
028f7d2ca7 Fix resize handling on click on borders (did not correctly use orientation) 2010-12-28 16:26:42 +01:00
Michael Stapelberg
d184587959 Bugfix: Don’t focus next window if the window was not mapped at the moment (on a different ws) 2010-12-28 02:27:11 +01:00
Michael Stapelberg
dc3c633ee4 Bugfix: store and properly load workspace order when restarting 2010-12-27 22:28:59 +01:00
Fernando Tarlá Cardoso Lemos
c88c3e3ab2 Default to a file in /tmp for the restart state.
The file is now created in /tmp using the process PID and the
username of the user running i3. The restart state file is only
loaded when restarting (the --restart option is appended to the
command line prior to the restart). That means that renaming the
old state file with the ".old" extension is no longer needed.

This "--restart" switch is supposed to be only used by i3. The
"-L" switch can be used to load a layout (and not delete it
afterwards). We unlink the state file after we load it so that
we don't keep cruft in /tmp or try to restart from an old config
file if restart_state is set.
2010-12-27 13:33:03 +01:00
Fernando Tarlá Cardoso Lemos
68f906f278 util.c is the proper place for those functions. 2010-12-27 13:28:17 +01:00
Fernando Tarlá Cardoso Lemos
3669bcbd5f Remove some commented out code. 2010-12-27 13:27:14 +01:00
Fernando Tarlá Cardoso Lemos
a1dd74da5a Implement default border styles (thanks litemotiv). 2010-12-27 13:10:45 +01:00
Michael Stapelberg
41eb810531 Bugfix: Don’t update focus when container is not mapped 2010-12-11 17:07:20 +01:00
Michael Stapelberg
8d5421e6a4 Bugfix: Invalidate focused_id to correctly focus new windows with the same ID 2010-12-11 17:03:53 +01:00
Fernando Tarlá Cardoso Lemos
d046fa446d Fix possible rounding errors. 2010-11-30 13:59:34 +01:00
Michael Stapelberg
3412e12602 xinerama.c: fix indention 2010-11-29 22:35:46 +01:00
Michael Stapelberg
a05b185701 xcb.c: fix indenting 2010-11-29 22:35:07 +01:00
Michael Stapelberg
1a40641462 workspace.{c,h}: remove obsolete code 2010-11-29 22:32:19 +01:00
Michael Stapelberg
5625a2f17f log.c: fix indenting 2010-11-29 22:28:23 +01:00
Michael Stapelberg
38b231b848 handlers.c: remove obsolete code 2010-11-29 22:25:55 +01:00
Michael Stapelberg
529bdf833f floating.c: remove obsolete code, fix indenting 2010-11-29 22:23:49 +01:00
Fernando Tarlá Cardoso Lemos
371ec037b8 Fix click to focus. 2010-11-29 22:09:05 +01:00
Michael Stapelberg
b0e41cb0a2 Bugfix: Don’t attach floating clients to 'nodes' when restoring (Thanks EelVex) 2010-11-29 21:46:00 +01:00
Michael Stapelberg
0f0d01336b Bugfix: Correctly attach floating Cons to a different workspace, extend testcase 2010-11-29 20:39:56 +01:00
Michael Stapelberg
ad825913b4 Bugfix: Fix crash when moving a floating Con to a different workspace, add testcase (Thanks EelVex) 2010-11-29 20:20:44 +01:00
Michael Stapelberg
b0068de3d7 Bugfix: Transfer 'percent' factor when splitting, add testcase for resizing 2010-11-29 11:24:12 +01:00
Michael Stapelberg
a0cd3c2bab Include 'percent' in tree JSON, use C-locale when dumping, update testcase 2010-11-29 11:10:17 +01:00
Michael Stapelberg
ee45c92564 Implement resizing (still buggy)
Committing basic resizing functionality. We need testcases for the bugs and
then eliminate them.
2010-11-29 10:56:16 +01:00
Michael Stapelberg
a86d8ab329 use con_num_children() 2010-11-28 22:45:39 +01:00
Michael Stapelberg
85b7e60bac Bugfix: Use separate child_mapped instead of checking state->initial (makes t/02-fullscreen.t pass)
This is necessary for windows which are mapped later, for example when there is
a fullscreen window in front of everything.
2010-11-28 22:09:26 +01:00
Michael Stapelberg
17caaf1159 Correctly update the _NET_WM_STATE hint when *not* going into fullscreen (when already in fullscreen) 2010-11-28 22:07:54 +01:00
Michael Stapelberg
49308d5026 Bugfix: don’t update focus when moving mouse over stacked/tabbed decorations (Thanks fernandotcl) 2010-11-28 21:07:08 +01:00
Michael Stapelberg
61e3415ddc Bugfix: Add deco_height to bsr.y (to configure the floatingcon correctly). Fixes t/12-floating-resize.t 2010-11-28 20:43:35 +01:00
Michael Stapelberg
2dba7ec1ec Bugfix for the last commit (broke some moving situations), update testcase 2010-11-28 20:15:47 +01:00
Michael Stapelberg
780b0ddbbc look & feel: when moving, descend if the container in target direction is a split-container 2010-11-28 18:35:11 +01:00
Michael Stapelberg
4fcd2f6e7e Bugfix: Fix focus when moving Cons
When having two v-splits on a horizontal desktop:
----------------
|  t1   |  t3  |
|-------|------|
|  t2   |  t4  |
----------------
…focus is on t2, and you move it into the right v-split (move after h), the
focus was not properly updated. That is, inside the right v-split, focus was
correct, but the workspace focus was still pointing to the left v-split.
2010-11-28 18:05:53 +01:00
Michael Stapelberg
4f1260ffe8 Also store/load window_rect when restarting 2010-11-28 17:20:29 +01:00
Michael Stapelberg
871da48b56 Bugfix: Only set to_focus when focused is actually 1 2010-11-28 17:20:16 +01:00
Michael Stapelberg
511cbec49b look and feel: when moving a Con is not possible, split a workspace level
This allows you to open three cons, then move the last one to the right (like
in previous i3 releases).
2010-11-28 14:45:14 +01:00
Michael Stapelberg
81044a7104 Correctly restore focus when restarting (Thanks fernandotcl) 2010-11-28 14:27:44 +01:00
Michael Stapelberg
f7fff5cec1 update indenting of src/util.c 2010-11-28 14:14:34 +01:00
Michael Stapelberg
32cc7134aa re-enable ipc_shutdown() when restarting 2010-11-28 14:11:44 +01:00
Michael Stapelberg
ab8400fff9 Bugfix: Use setsid() to avoid SIGINT for child processes 2010-11-28 14:03:43 +01:00
Michael Stapelberg
02b786509b Upon ConfigureRequests, send a generated ConfigureNotify (Thanks fernandotcl)
This fixes problems with GVim in stacking mode for example.
2010-11-28 13:19:49 +01:00
Michael Stapelberg
d60e8c56dc little style fixes, add vim modeline 2010-11-28 13:02:29 +01:00
Fernando Tarlá Cardoso Lemos
69fc6449dc libXcursor support (themed cursors). 2010-11-28 13:01:45 +01:00
Michael Stapelberg
3bab222aa7 Bugfix: Re-attach windows in correct order when switching layout (Thanks fernandotcl) 2010-11-28 01:51:16 +01:00
Michael Stapelberg
d0de3f403d Bugfix: Restore focus after changing layout (Thanks fernandotcl) 2010-11-28 01:39:47 +01:00
Michael Stapelberg
2c157283ea fix third argument to strncat(), use smalloc(), use strlen(".old")+1 2010-11-28 01:22:10 +01:00
Fernando Tarlá Cardoso Lemos
0a17fe973c Make the restart path configurable. 2010-11-28 01:18:10 +01:00
Michael Stapelberg
622b51a1ea Fix switching containers by moving the mouse over their decorations when in the same container 2010-11-28 01:13:18 +01:00
Michael Stapelberg
6fe0e58a64 Bugfix: Also render decorations of nearby cons when getting an ExposeEvent (Thanks fernandotcl) 2010-11-28 00:52:24 +01:00
Michael Stapelberg
0cfebcb5b6 remove some debug messages 2010-11-27 18:05:45 +01:00
Michael Stapelberg
2c3e5dbc65 Bugfix: unmap windows in a separate step to avoid focus problems with fullscreen windows
This fixes an ugly bug with Adobe Flash in fullscreen mode, for example on
YouTube. See comments in the diff for some explanation.
2010-11-27 17:45:23 +01:00
Michael Stapelberg
d47a1edf22 Bugfix: configure windows before mapping, correctly store window_rect instead of rect 2010-11-27 16:44:45 +01:00
Michael Stapelberg
3f3fa08b15 more debug for ClientMessages 2010-11-27 16:44:32 +01:00
Michael Stapelberg
6431d3d187 fix indention 2010-11-27 16:44:20 +01:00
Fernando Tarlá Cardoso Lemos
1d52bf179b Run the autostart commands. 2010-11-26 23:30:27 +01:00
Fernando Tarlá Cardoso Lemos
2faac65237 Always add to the focus list, fixes crash. 2010-11-26 23:26:53 +01:00
Michael Stapelberg
77d0d42ed2 look and feel: create split container when switching workspace layout
Quote from the source:
  When the container type is CT_WORKSPACE, the user wants to change the
  whole workspace into stacked/tabbed mode. To do this and still allow
  intuitive operations (like level-up and then opening a new window), we
  need to create a new split container. */
2010-11-26 23:08:12 +01:00
Michael Stapelberg
c3981e12d3 Bugfix: use bufcopy instead of buf (Thanks fernando) 2010-11-26 22:38:05 +01:00
Michael Stapelberg
65bd71b213 remove some obsolete code 2010-11-26 22:15:09 +01:00
Michael Stapelberg
b2db9ac797 Bugfix: always reset state->initial to false, not only for different stacking order
As initial may be set to true again after initializing the window, we need to
ensure that it is properly cleared. Otherwise, this leads to ghost windows when
unmapping (such as the Xpdf about dialog) due to i3 issuing MapWindow after an
Unmap happened but before i3 actually received/handled the UnmapNotify.
2010-11-26 20:15:08 +01:00
Michael Stapelberg
97bc8f4b86 Bugfix: Don’t draw decorations of CT_FLOATING_CONs 2010-11-26 19:24:14 +01:00
Michael Stapelberg
db3002fce0 Implement click on stack/tab decoration to focus 2010-11-26 18:57:15 +01:00
Michael Stapelberg
df7788386d re-indent click function 2010-11-26 18:48:27 +01:00
Michael Stapelberg
962fe075b9 Bugfix: Upon ExposEvents, redraw decoration also for the window itself
In the meantime, windows can have decorations (borders) on their own frame, too.
2010-11-26 18:37:34 +01:00
Michael Stapelberg
e744b48b30 Bugfix: When handling an EnterNotify for a child window, access the correct con->layout 2010-11-26 18:18:40 +01:00
Michael Stapelberg
4d7c24b92c Bugfix: Correctly count variables when parsing the configfile (Thanks dbp) 2010-11-26 11:25:51 +01:00
Michael Stapelberg
1de97a1f1f correctly sort numbered workspaces (+testcase)
Numbered workspaces (workspaces with a name containing only digits) will be
inserted in the correct order now. Named workspaces are always sorted after
numbered workspaces and in the order of creation.
2010-11-21 23:35:49 +01:00
Michael Stapelberg
fab8b84db7 ipc: fix current_workspace 2010-11-21 22:12:34 +01:00
Michael Stapelberg
a71d782da9 fix indention of src/ipc.c 2010-11-21 22:03:55 +01:00
Fernando Tarlá Cardoso Lemos
ae22fe065f Send change:empty too. 2010-11-21 21:36:33 +01:00