Commit Graph

336 Commits

Author SHA1 Message Date
Michael Stapelberg 0e8b3c3401 Bugfix: floating: open windows with correct width/height 2009-06-21 13:18:54 +02:00
Michael Stapelberg 2751eedae5 Bugfix: Floating: open windows at their requested position 2009-06-21 13:12:42 +02:00
Michael Stapelberg 6ca9210335 Bugfix: Properly integrate libxcb’s event loop into libev.
Fixes a race condition with GIMP (where it configured its window,
sent the map request and waited for the window to get mapped, but
i3 didn’t get the event until another one was sent (key binding for
example)).

The new solution is much better as it properly hands off all
the work to xcb_poll_for_event.

Inspired by awesome, which uses the same mechanism. Thanks.
2009-06-21 13:05:54 +02:00
Michael Stapelberg ce97e23913 Remove getting colorpixels from the X server, saves code and round-trips. Requires truecolor displays.
If anyone has a serious (!) use for non-truecolor displays and
problems with i3’s colors after this commit, please send a mail.
2009-06-20 18:05:24 +02:00
Michael Stapelberg 83d3146b65 Bugfix: Correctly raise the currently focused client when going into stack mode 2009-06-20 00:31:57 +02:00
Michael Stapelberg 8e19f8dabf floating: Don’t let clients become hidden under stack windows or fulscreen clients (Thanks Mirko) 2009-06-19 23:18:43 +02:00
Michael Stapelberg 5c0496a3ef Bugfix: Make sure floating clients are alwalys above tiling clients (Thanks Mirko) 2009-06-19 22:57:19 +02:00
Michael Stapelberg 589a73c8ea Bugfix: Correctly check for floating mode in the buttonpress handler (Thanks Mirko) 2009-06-19 22:48:18 +02:00
Michael Stapelberg ba070fcc6c Bugfix: Obey colspan/rowspan when checking if containers can be snapped to the right/bottom (Thanks Mirko)
This fixes ticket #54.
2009-06-19 22:40:25 +02:00
Michael Stapelberg 93ff4159c1 Bugfix: Obey colspan/rowspan when checking if containers can be snapped to the right/bottom (Thanks Mirko)
This fixes ticket #54.
2009-06-19 22:39:03 +02:00
Michael Stapelberg 325d1b301f Implement the special workspace ~ for assignments, which will set clients floating automatically 2009-06-19 20:20:00 +02:00
Michael Stapelberg bcd479ca92 floating: nested functions make the callbacks a lot more easier & beautiful 2009-06-19 19:43:01 +02:00
Michael Stapelberg 89c0caaec4 Implement a command for hiding all floating windows (and showing them again) 2009-06-19 13:59:29 +02:00
Michael Stapelberg 5c48444b4e Implement the possibility to set a workspace open clients automatically in floating mode
Use "wwt" (with workspace: toggle floating) in your configuration file
2009-06-19 13:20:10 +02:00
Michael Stapelberg 4135aaad7c Implement moving of floating clients 2009-06-19 12:57:21 +02:00
Michael Stapelberg 51402b05f5 Bugfix: Correctly initialize automatically floating clients (some rendering issues) 2009-06-19 12:34:31 +02:00
Michael Stapelberg a6d7f5451d Also set DIALOG, UTILITY and SPLASH windows floating automatically 2009-06-19 12:05:55 +02:00
Michael Stapelberg a2a8cd85d6 Bugfix: Don’t crash when programs set NULL hints (xev(1) for example)
This only happened if you had some assignment configured
2009-06-19 11:05:00 +02:00
Michael Stapelberg 1c02ddb4a7 Bugfix: Fix assignment of clients to other workspaces (Thanks badboy)
The problem was that the old_focused pointer was pointing to an element
of a different list. Using CIRCLEQ_APPEND_AFTER is not a good idea on
with such an element…
2009-06-18 01:25:46 +02:00
Michael Stapelberg 00c6bdeb0b Implement changing focus via keyboard between floating clients, fix several floating bugs 2009-06-14 01:04:59 +02:00
Michael Stapelberg e6d9c7bb9e Bugfix: Don’t use the minimum amount of pixels for dock clients which don’t set size hints 2009-06-13 12:30:28 +02:00
Michael Stapelberg 56af58eb0b Bugfix: Put floating clients into the focus stack (Thanks Mirko) 2009-06-13 12:20:39 +02:00
Michael Stapelberg 02fa3c2cb8 Bugfix: Correctly initialize the new atom, don’t float dock windows 2009-06-13 12:18:16 +02:00
Michael Stapelberg 13002dc04e Bugfix: Actually reconfigure unmapped windows when they request it
Before, we only sent a fake message. While this was sufficient for the
client side most of the time, it didn’t allow us to open floating
windows with the correct size.
2009-06-12 23:47:04 +02:00
Michael Stapelberg 052190ad05 Handle transient hint and window class dialog to mark clients as floating 2009-06-12 22:59:23 +02:00
Michael Stapelberg cb12e205d9 Bugfix: When toggling floating, the copied size is the client’s size, not the total size 2009-06-12 22:55:56 +02:00
Michael Stapelberg 6e5406167c Bugfix: Use the correct size for the modifiers (Thanks Moredread!) 2009-06-11 03:30:56 +02:00
Michael Stapelberg 70be57352c Fix memleak in config parsing (variables weren’t freed) 2009-06-11 03:30:42 +02:00
Michael Stapelberg 55f0aa8f28 Add a proper error message if connection to the X server can’t be established 2009-06-11 03:30:26 +02:00
Michael Stapelberg d70ea03356 Remove some dead code, add default paths to switch() to make static analyzers happy
Check was done with scan-build from the LLVM suite. The remaining reports are false
positives and have been reported to llvm:

http://llvm.org/bugs/show_bug.cgi?id=4358
http://llvm.org/bugs/show_bug.cgi?id=4359
2009-06-10 19:59:36 +02:00
Michael Stapelberg 2f334c3f59 Bugfix: Don’t set focus when unmapping clients if the workspace is not active (Thanks Mirko)
This fixes ticket #53 because current workspace was set to the
workspace which was deleted.
2009-06-07 19:09:39 +02:00
Michael Stapelberg fb63c2ed58 Implement moving floating clients using Mod1+Left mouse button 2009-06-03 13:54:13 +02:00
Michael Stapelberg 036728c4d7 Use the size when mapping the window as size for floating (correct size for tool windows) 2009-06-02 14:24:37 +02:00
Michael Stapelberg 3f925a56d3 Fix warning about dereferencing type-punned pointers 2009-06-01 21:12:13 +02:00
Michael Stapelberg 553db28664 Switch to libev for the event loop to build a base for IPC stuff. Please test! 2009-06-01 20:59:40 +02:00
Michael Stapelberg e689be983b Implement variables in configfile.
This implements ticket #42.

Syntax is "set $key value". All further instances of $key will be
replaced with value before parsing each line of the configfile.
2009-06-01 16:19:06 +02:00
Michael Stapelberg 170ba60191 Bugfix: Rendering of the bottom border line was still off by one 2009-06-01 15:35:59 +02:00
Michael Stapelberg 2a67630aa6 Optimization: Get the colorpixels when loading configuration, make use of the new config struct
Instead of building arrays of colorpixels we can simply use a pointer
to a struct Colortriple. Furthermore, by getting the colorpixels when
loading the configuration, we save a lot of function calls in the
main code.
2009-06-01 15:14:45 +02:00
Michael Stapelberg c73bb1feaa Draw the border lines in the window decoration correctly 2009-05-31 18:37:47 +02:00
Michael Stapelberg 517c47ca95 Don’t check twice for client.focused, change all places were colorcodes are used 2009-05-31 17:18:49 +02:00
Michael Stapelberg 0cb5d7448d Implement clients going automatically into floating 2009-05-31 00:31:18 +02:00
Michael Stapelberg 706c44509e retab! src/config.c 2009-05-30 22:24:05 +02:00
Michael Stapelberg cbc3880007 Use a more efficient struct for storing colors, validate/parse them more easily 2009-05-30 22:20:32 +02:00
Atsutane 65bcf170ed Introduced color setting. 2009-05-30 17:59:04 +02:00
Michael Stapelberg 2d5b1f0a37 Bugfix: Send fake configure notify events when moving clients (Thanks Volker)
This fixes ticket #47
2009-05-30 11:49:50 +02:00
Michael Stapelberg fccbdea925 Bugfix: Correctly set focus when switching to a workspace with floating clients
This fixes ticket #45
2009-05-30 11:41:49 +02:00
Michael Stapelberg b1eb93326f Bugfix: Correctly cleanup stack_windows when setting clients to floating
This fixes ticket #44
2009-05-30 11:35:32 +02:00
Michael Stapelberg ac6561019b Don’t kill workspaces on which you currently are when changing screen configuration 2009-05-27 18:46:58 +02:00
Michael Stapelberg d4fb34abdd Bugfix: Don’t ignore enter_notify events for clients on different screens (Thanks Mirko)
This fixes ticket #41.
2009-05-27 18:19:14 +02:00
Michael Stapelberg 2ed621aec9 Bugfix: Forgot to update client’s workspace pointer (Thanks Mirko) 2009-05-27 12:28:51 +02:00
Michael Stapelberg 94ee39d1ce Bugfix: Forgot to update client’s workspace pointer (Thanks Mirko) 2009-05-27 12:27:29 +02:00
Michael Stapelberg bcd68d9ca1 Bugfix: Fix crash when focusing/moving on an empty workspace (Thanks Mirko) 2009-05-27 12:15:23 +02:00
Michael Stapelberg b0cf3ec026 Document binding on Mode_switch in userguide, be more verbose in config 2009-05-26 17:37:56 +02:00
Michael Stapelberg 9c3b37f2d1 Bugfix: Cleanup the table after putting clients into floating mode 2009-05-26 17:16:51 +02:00
Michael Stapelberg 94cead993c Don’t process autostart when restarting (new parameter -a) 2009-05-26 17:09:34 +02:00
Michael Stapelberg b58e2fa8ed Move toggle_fullscreen to client.c 2009-05-26 16:49:57 +02:00
Michael Stapelberg ac5c2fcf19 Bugfix: Fix fullscreen for floating clients, fix window name updates for floating clients 2009-05-26 16:46:50 +02:00
Michael Stapelberg 5b8e2ecb18 Implement floating (please test and find bugs)
Details which are missing: A command to hide/show all floating clients,
moving/resizing clients with your mouse holding Mod1 (click anywhere
in the client, not just on its borders), resize/move by keyboard, select
next/previous client by keyboard
2009-05-23 16:34:03 +02:00
Michael Stapelberg 7fde55578d Bugfix: Correctly handle mode_switch state bit, more debugging output for states
We abuse (1 << 8) as mode_switch bit, which is in the range of the
filtered state bits (see previous commit). Therefore, we need to
filter first and then check for mode_switch.

Furthermore, we used 0x2 before, which was just wrong. So, use our
bitmask, not the normal one (0x2).
2009-05-19 15:24:17 +02:00
Michael Stapelberg d98c514f82 Bugfix: Correctly handle mode_switch state bit, more debugging output for states
We abuse (1 << 8) as mode_switch bit, which is in the range of the
filtered state bits (see previous commit). Therefore, we need to
filter first and then check for mode_switch.

Furthermore, we used 0x2 before, which was just wrong. So, use our
bitmask, not the normal one (0x2).
2009-05-19 15:22:50 +02:00
Michael Stapelberg 5038b3c592 Bugfix: keypress: Only use the lower 8 bits of the mask so that mouse buttons are filtered out (Thanks Mirko)
Sometimes, when the mouse button gets stuck, state contains the bit for
BUTTON_MASK_1 (or other buttons). We filter them out to continue processing
keys correctly.
2009-05-19 13:52:23 +02:00
Michael Stapelberg 77ab4c0b10 Bugfix: keypress: Only use the lower 8 bits of the mask so that mouse buttons are filtered out (Thanks Mirko)
Sometimes, when the mouse button gets stuck, state contains the bit for
BUTTON_MASK_1 (or other buttons). We filter them out to continue processing
keys correctly.
2009-05-19 13:51:03 +02:00
Michael Stapelberg 1089fb7311 Bugfix: Don’t crash when above dock windows (Thanks Mirko) 2009-05-17 10:54:12 +02:00
Michael Stapelberg b35599004a Move the manage_*-functions into their own file as they got quite large 2009-05-16 18:25:04 +02:00
Michael Stapelberg d5d44e66a2 Bugfix: Re-assign dock windows to different workspaces when a workspace is deleted
Killing a dock client and having destroyed workspace 1 before (or the workspace
on which the dock client was started when it was not auto-started) crashed i3 before
this bugfix.
2009-05-16 18:12:35 +02:00
Michael Stapelberg e79cca8f72 Implement putting clients onto specific workspaces ("assign" in the configfile)
This closes ticket #39
2009-05-16 17:32:36 +02:00
Michael Stapelberg 610fabf873 Bugfix: Correctly handle col-/rowspanned containers when setting focus (Thanks Ned)
This fixes ticket #34
2009-05-09 20:00:20 +02:00
Michael Stapelberg 4cc8d53706 Bugfix: Correctly handle col-/rowspanned containers when setting focus (Thanks Ned)
This fixes ticket #34
2009-05-09 19:59:36 +02:00
Michael Stapelberg b7f94e9b5d Fix a bug in window placement introduced by the last commit 2009-05-09 19:13:37 +02:00
Michael Stapelberg 3c6c5dff92 Fix a bug in window placement introduced by the last commit 2009-05-09 19:13:14 +02:00
Michael Stapelberg 1256730b4b Bugfix: Fix display/resizing of colspanned containers 2009-05-09 18:43:50 +02:00
Michael Stapelberg 3ccc0d7794 Bugfix: Fix display/resizing of colspanned containers 2009-05-09 18:43:02 +02:00
Michael Stapelberg 5b4f10eaca Bugfix: Store width_factor/height_factor per workspace, not per container
This is a relatively big change, however all cases should be handled by
now.

Because the function to do graphical resizing got rather large, I’ve created
a new file src/resize.c for it.

This fixes ticket #35.
2009-05-09 17:50:51 +02:00
Michael Stapelberg 8e1990f058 Bugfix: Store width_factor/height_factor per workspace, not per container
This is a relatively big change, however all cases should be handled by
now.

Because the function to do graphical resizing got rather large, I’ve created
a new file src/resize.c for it.

This fixes ticket #35.
2009-05-09 17:48:35 +02:00
Michael Stapelberg 18da0a3017 Bugfix: Force reconfiguration of all windows on workspaces which needed to be re-assigned (Thanks Mirko)
When you disable a Xinerama screen (think of removing a video projector),
the workspaces of that screen need to be re-assigned to another screen.
Previously, the clients affected by this re-assignment did not get re-
configured, which made them appear on the next screen which got configured
at the position of the old one again if you did not switch to the reassigned
workspace before.

So, to reproduce it:
xrandr --output VGA --mode 1280x1024 --right-of LVDS
move windows to the new workspace
xrandr --output VGA --off
xrandr --output VGA --mode 1280x1024 --right-of LVDS

This fixes ticket #36
2009-05-09 13:04:34 +02:00
Michael Stapelberg d24e47a0f3 Bugfix: Force reconfiguration of all windows on workspaces which needed to be re-assigned (Thanks Mirko)
When you disable a Xinerama screen (think of removing a video projector),
the workspaces of that screen need to be re-assigned to another screen.
Previously, the clients affected by this re-assignment did not get re-
configured, which made them appear on the next screen which got configured
at the position of the old one again if you did not switch to the reassigned
workspace before.

So, to reproduce it:
xrandr --output VGA --mode 1280x1024 --right-of LVDS
move windows to the new workspace
xrandr --output VGA --off
xrandr --output VGA --mode 1280x1024 --right-of LVDS

This fixes ticket #36
2009-05-09 13:01:23 +02:00
Michael Stapelberg 8c6c4270a9 Bugfix: Don’t raise clients in fullscreen mode, send correct position to clients in fullscreen mode (Thanks ch3ka, mist)
This fixes #38 which only happened for clients which actively tried
to reconfigure themselves.
2009-05-08 23:23:47 +02:00
Michael Stapelberg 89076ea7cf Bugfix: Don’t raise clients in fullscreen mode, send correct position to clients in fullscreen mode (Thanks ch3ka, mist)
This fixes #38 which only happened for clients which actively tried
to reconfigure themselves.
2009-05-08 23:22:40 +02:00
Michael Stapelberg 4b77d93c2e Bugfix: Resize all containers in the column instead of only the active one (Thanks Ned)
This fixes ticket #33.
2009-05-07 13:51:34 +02:00
Michael Stapelberg a2ac022208 Bugfix: Resize all containers in the column instead of only the active one (Thanks Ned)
This fixes ticket #33.
2009-05-07 13:46:34 +02:00
Michael Rudolf 3400f0e6bd Implement autostart using "exec" in config
Syntax is "exec <application>", like when creating a binding.
Multiple entries are possible, applications are started in
the specified order.
2009-05-05 20:14:02 +02:00
Michael Stapelberg 3a2b546c9e Implement a command to travel the focusstack. This can be used like a jumpback.
However, it is a bit more flexible obviously. You can specify the
offset of the window you want to go to, to implement workflows like
the following:
 * Jump to mutt
 * Jump to irssi
 * Jump back ("focus 2" would be the command)
2009-05-05 17:25:56 +02:00
Michael Stapelberg 56d637a665 Add debug message for jumping 2009-05-05 16:57:21 +02:00
Michael Stapelberg f72214725c Implement jumping to windows by matching their class / title 2009-05-05 16:53:22 +02:00
Michael Stapelberg e295ab302b Implement storing WM_CLASS of each client 2009-05-05 16:53:22 +02:00
Michael Stapelberg 12fa69329a Change syntax of jump to col,row instead of row,col to make it consistent with the internal data structures, document it in commandmode 2009-05-05 16:47:06 +02:00
Michael Stapelberg 79e5d5f29d Some small style changes to make urs’ code consistent 2009-05-05 16:47:05 +02:00
Urs Ganse efbe2dfeaa Added a "jump" command to directly focus a container.
Syntax is "jump <ws> <row> <col>".
This is quite handy for clients that you always keep
in the same spot, and like to jump to quite often. The
irc client would be an example.
2009-05-05 16:47:05 +02:00
Michael Stapelberg 4a6a748561 Bugfix: Reconfigure bar window when changing resolutions (Thanks Mirko) 2009-05-03 22:59:50 +02:00
Michael Stapelberg c3c05db579 Bugfix: Fix crash on new clients (Thanks Mirko) 2009-05-03 22:18:33 +02:00
Michael Stapelberg d4642ac7d8 Fix a bug caused by not absolutely raising windows (revision 95f4085bc) 2009-05-03 16:41:53 +02:00
Michael Stapelberg c27c7fc020 Bugfix: Insert windows at correct position/set focus correctly when moving between containers 2009-05-03 16:24:12 +02:00
Michael Stapelberg a0d23c53b3 Bugfix: Re-distribute free space when closing customly resized containers, re-evaluate for other containers
This fixes ticket #4
2009-05-03 14:29:58 +02:00
Michael Stapelberg eab895ac9e Bugfix: Correctly restore focus when leaving fullscreen mode 2009-05-03 02:13:11 +02:00
Michael Stapelberg 95f4085bcd Raise clients only relatively to the one which was focused before.
This should fix ticket #31.
2009-05-03 00:23:12 +02:00
Michael Stapelberg 99054fb50f Bugfix: Fix drag&drop in GTK applications (firefox, thunderbird)
Thanks to Daniel Wäber’s contribution to wmii:
http://code.suckless.org/hg/wmii/rev/f4f25de0de54
2009-05-02 20:51:55 +02:00
Michael Stapelberg e91f399609 Bugfix: Correctly restart i3 when not using its absolute path 2009-05-01 16:10:02 +02:00
Michael Stapelberg c689b93bce Bugfix: Don’t crash when asprintf() can’t print the window name (Thanks ch3ka)
Apparantly, under some conditions (using LANG=en_US.UTF-8, other locale
variables unset), asprintf() says "Invalid or incomplete multibyte or
wide character" when given a string in COMPOUND_TEXT encoding.

For now, we properly handle asprintf-errors (this should have been
before), but there might be a better solution.
2009-04-28 22:41:00 +02:00
Michael Stapelberg aefae99a11 Bugfix: That should be xcb_keycode_t, not xcb_keysym_t 2009-04-19 21:40:49 +02:00
Michael Stapelberg 69c9db4016 Add conditional for the 0.3.3 → 0.3.4 API fix in libxcb-keysyms 2009-04-19 21:37:34 +02:00