Commit Graph

209 Commits

Author SHA1 Message Date
Fernando Tarlá Cardoso Lemos fa3ad8be10 Support for custom bg colors for clients. 2010-09-24 15:46:57 +02:00
Michael Stapelberg 96128c9cfb Merge branch 'next' 2010-03-30 13:06:41 +02:00
Michael Stapelberg a6d22f005d Revert "Bugfix: Ignore enter_notify when warping pointer (makes "goto" work correctly)"
This reverts commit 7d6e80b5ef.
Instead fix it by setting focus correctly before causig the warp.
2010-03-27 17:52:15 +01:00
Michael Stapelberg 7d6e80b5ef Bugfix: Ignore enter_notify when warping pointer (makes "goto" work correctly) 2010-03-27 17:04:56 +01:00
Michael Stapelberg 34f79416d5 ipc: change default socket path to ~/.i3/ipc.sock, enable in default config
Having the IPC socket is handy, so enable it by default. Also, if
you have > 1 user running i3 on the same machine, the old path of
/tmp/i3-ipc.sock is not so useful. On the other hand, we needed
quite a bit of changes to make tilde expansion and creation of
directories (mkdir -p) work…
2010-03-27 14:43:36 +01:00
Michael Stapelberg a542515f9e Fix memory leaks 2010-03-26 01:52:39 +01:00
Michael Stapelberg 46e7cf5fe1 Handle destroy notify events like unmap notify events
This helps for windows which are immediately destroyed instead of
unmapped, like when starting i3status | ./foobar | dzen2 -dock
and foobar does not exist (i3status and dzen2 will get a SIGPIPE).
2010-03-24 16:52:16 +01:00
Michael Stapelberg bbea32f021 backport client_leave_fullscreen from next branch (Thanks ccount) 2010-03-20 14:47:33 +01:00
Michael Stapelberg aec40126b4 ipc: implement output event 2010-03-19 22:40:43 +01:00
Michael Stapelberg 4ce0d6f014 ipc: implement GET_OUTPUTS 2010-03-19 22:24:52 +01:00
Michael Stapelberg af00df9321 Use DLOG for debug messages instead of printf (Thanks kruM) 2010-03-19 18:48:36 +01:00
Michael Stapelberg f7a1a9fb20 ipc: correctly shutdown IPC sockets when exiting/restarting 2010-03-16 02:44:47 +01:00
Michael Stapelberg c738b2e454 Don’t use SYNC key bindings for Mode_switch but re-grab keys
Before this commit, i3 used key bindings in SYNC mode for bindings
like Mode_switch + <a> and replayed the key if the current state
did not include Mode_switch. This had some problems:

1) The WM needed to acknowledge much more key presses than you
   actually had bindings for, thus making the system a bit laggy
   sometimes.
2) Users of layouts who constantly type in the third level (like
   russian layouts) did not get their cyrillic symbols correctly
   (they were not replayed right), neither did the keybindings
   work in both modes.

So, the current implementation uses the following approach: XKB
provides an event which contains the current state (including
the current level). i3 signs up for this event and upon receival,
it re-maps the bindings using Mode_switch (enables them when the
level goes to the third level and disables them as soon as the
level goes back to normal). This fixes both problems.
2010-03-14 22:40:58 +01:00
Michael Stapelberg 2df374ca4c Add configuration option to turn off workspace bar 2010-03-13 19:15:28 +01:00
Michael Stapelberg b7da973d09 ipc: change message type of events (first bit set high) 2010-03-13 15:04:23 +01:00
Axel Wagner 9cb35383a8 Implement proportional floating-resize. 2010-03-13 13:22:39 +01:00
Michael Stapelberg 3db4890683 ipc: implement events, cleanup the code a bit 2010-03-12 21:05:05 +01:00
Michael Stapelberg d6f726283c ipc: also send a reply for COMMAND messages 2010-03-12 15:29:44 +01:00
Axel Wagner 0f5256dc72 Floating resize uses arbitrary corners
This closes ticket #121
2010-03-12 03:11:20 +01:00
Michael Stapelberg 7c1be83692 Update comment (Thanks Merovius) 2010-03-12 02:59:16 +01:00
Michael Stapelberg 9a9ba1b859 ipc: implement GET_WORKSPACES message type
This is the foundation to use dzen2 or similar as a complete
replacement for the internal workspaces bar.

A testcase is included, more documentation about the IPC interface
will follow.
2010-03-11 15:58:39 +01:00
Michael Stapelberg bd76e994b8 Re-add old Xinerama code for the poor nvidia users
Add --force-xinerama when starting i3 to use Xinerama instead of RandR.
This should *ONLY* be done if you have no other choice (nvidia’s
binary driver uses twinview and does not expose the monitor information
through RandR).
2010-03-09 21:25:54 +01:00
Axel Wagner 9c77b0f9a1 Implement screen-spanning fullscreen-mode (command: 'fg')
This closes ticket #188
2010-03-08 11:15:31 +01:00
Michael Stapelberg 85308715ea Turn nested functions into real functions or macros
This enables compilation with llvm-clang and thus closes ticket #101.
While it makes the code more ugly, I don’t see a beautiful solution
which would enable us to stay with the more elegant solution of
nested functions and still allow compilation with any other compiler
than gcc.
2010-03-07 19:00:34 +01:00
Michael Stapelberg 8d648b4e37 Update function names, variable names and documentation for the RandR changes 2010-03-05 16:18:41 +01:00
Michael Stapelberg 8b192ac7ed Bugfix: Correctly hide/show workspaces when enabling new outputs, correctly handle focus (Thanks Merovius) 2010-03-05 15:22:12 +01:00
Michael Stapelberg 718d62a3cd Bugfix: Fix clone mode with new RandR code (Thanks Merovius) 2010-03-05 14:32:48 +01:00
Michael Stapelberg b53c5861a2 Restore geometry of all windows before exiting/restarting (Thanks Sasha)
This fixes ticket #185
2010-03-02 15:25:08 +01:00
Michael Stapelberg aae824b1f3 Change workspace assignments to use the RandR output name instead of <screen> 2010-03-02 13:35:43 +01:00
Michael Stapelberg 818e02ef35 huge change: implement RandR instead of Xinerama
Thanks to Merovius for doing a proof of concept on this one and
being a driving force behind the idea.

Using RandR instead of Xinerama means that we are now able to use
the full potential of the modern way of configuring screens. That
means, i3 now has an idea of the outputs your graphic driver
provides, which allowed us to get rid of the ugly way of detecting
changes in the screen configuration which we used before. Now, your
workspaces should not be confused when changing output modes anymore.

Also, instead of having ugly heuristics to assign your workspaces
to (the screen at position X or the second screen in the list of
screens) you will be able to just specify an output name.

As this change basically touches everything, you should be prepared
for bugs. Please test and report them!
2010-03-02 12:47:21 +01:00
Michael Stapelberg 6f72970ece add xcb_set_window_rect which configures a window according to a Rect 2010-02-28 20:35:30 +01:00
Michael Stapelberg 7caf98dd18 Move update_if_necessary to util.c, will be necessary later 2010-02-28 18:39:11 +01:00
Michael Stapelberg 64cf88403d lexer/parser: proper error messages
Error messages now look like this:

13.02.2010 19:42:30 - ERROR:
13.02.2010 19:42:30 - ERROR: CONFIG: syntax error, unexpected <word>,
expecting default/stacking/tabbed or stack-limit
13.02.2010 19:42:30 - ERROR: CONFIG: in file "inv", line 15:
13.02.2010 19:42:30 - ERROR: CONFIG:   new_container foobar
13.02.2010 19:42:30 - ERROR: CONFIG:                 ^^^^^^
13.02.2010 19:42:30 - ERROR:
2010-02-13 19:42:54 +01:00
Michael Stapelberg cd929f1199 Bugfix: Correctly do boundary checking/moving to other workspaces when moving floating clients via keyboard (Thanks sasha) 2010-02-12 15:56:47 +01:00
Michael Stapelberg 3d13d53ae7 Bugfix: Use both parts of WM_CLASS (it contains instance and class) (Thanks fallen)
Actually, WM_CLASS contains two null-terminated strings, so we cannot
use asprintf() to get its value but rather use strdup() to get both
of them. Both values are compared when a client is matched against
a wm_class/title combination (for assignments for example).
2010-02-12 15:56:19 +01:00
Michael Stapelberg 87f8c501da Bugfix: Correctly do boundary checking/moving to other workspaces when moving floating clients via keyboard (Thanks sasha) 2010-02-12 13:06:59 +01:00
Michael Stapelberg 0b6b8e8380 Bugfix: Use both parts of WM_CLASS (it contains instance and class) (Thanks fallen)
Actually, WM_CLASS contains two null-terminated strings, so we cannot
use asprintf() to get its value but rather use strdup() to get both
of them. Both values are compared when a client is matched against
a wm_class/title combination (for assignments for example).
2010-02-12 12:12:25 +01:00
Michael Stapelberg 88b9700cdb Invert logic for the last commit
This makes it more clear that the option is meant to be a special
case (it *disables* part of the focus handling). Also, when
initializing the config data structure with zeros, it will get
initialized with the right value.

Furthermore, the config file parser now also accepts various values
which represent "true", not only numbers.
2010-01-29 21:58:50 +01:00
Kim Silkebækken (lokaltog) 7f10970fc7 Added focus_follows_mouse config option 2010-01-29 21:58:50 +01:00
Michael Stapelberg fc4ce84d36 Use doxygen compatible comments 2010-01-03 21:53:42 +01:00
Michael Stapelberg 8afdf54078 Update copyright to 2010 2010-01-03 21:53:30 +01:00
Jan-Erik Rediger 614b360bd4 added popup for handling SIGSEGV or SIGFPE
the popup is placed on each of the virtual screens
the user can decide to restart or quit i3
in case of an exit a core-dump is generated
2010-01-03 21:32:50 +01:00
Michael Stapelberg 505eaaf349 Bugfix: Containers could lose their snap state (Thanks Atsutane)
When being on a different workspace than the one where the snapped
container is, the function to cleanup cols/rows would clean up too
much.
2010-01-01 22:43:02 +01:00
Michael Stapelberg ba2dd3a3eb Bugfix: Containers could lose their snap state (Thanks Atsutane)
When being on a different workspace than the one where the snapped
container is, the function to cleanup cols/rows would clean up too
much.
2010-01-01 22:40:50 +01:00
Michael Stapelberg 75aac5bc02 ewmh: implement support for _NET_WORKAREA (rdesktop can use that)
Please note that rdesktop’s -g workarea option will not work on
64-bit systems at the moment because of a bug in rdesktop (see the
rdesktop-devel mailing list).
2009-12-31 17:48:41 +01:00
Michael Stapelberg e7e9e8e49d ewmh: correctly set _NET_ACTIVE_WINDOW 2009-12-25 15:19:39 +01:00
Michael Stapelberg 0641e6a1a3 ewmh: correctly set _NET_CURRENT_DESKTOP to the number of the active workspace 2009-12-25 15:05:17 +01:00
Michael Stapelberg 848d9c1b01 Make containers containing exactly one window behave like default containers
Starting from this commit, a borderless window will always be
borderless if it is the only window in a container. For example,
you can have Firefox borderless in a tabbed container and as soon
as the download manager or a viewer gets opened, the container
will be rendered like a normal tabbed container.

This solves the user-interface dilemma of borderless/1-px-border
windows inside stacked/tabbed containers, at least for this special
case. Thanks to Merovius for this suggestion.
2009-12-22 23:40:06 +01:00
Michael Stapelberg e900a8d23d xinerama: correctly put windows which are assigned to a specific screen on that screen when it becomes available (Thanks badboy) 2009-12-21 22:30:08 +01:00
Michael Stapelberg 6ef0d1fa79 Touch each log message and classify it as DLOG (debug), ELOG (error) or LOG (verbose) 2009-12-19 22:40:23 +01:00