Commit Graph

7202 Commits

Author SHA1 Message Date
Michael Stapelberg
e4b3f46366 README: update build status badge for GitHub Actions 2021-05-23 16:06:13 +02:00
Michael Stapelberg
c94f41b2da
switch from Travis to GitHub actions for continuous integration (CI) (#4428) 2021-05-23 15:44:28 +02:00
Vladimir Panteleev
e44aa7a9a9 docs/ipc: Explicitly state null as a possible type
This helps write correct descriptions of the JSON schema for strongly
typed languages that support deserializing to native types (and
require a different type for null).
2021-05-20 21:47:43 +02:00
Vladimir Panteleev
d4c23ec24b docs/ipc: Add descriptions of all message payloads
These seemed to be inconsistently specified.

Particularly, the "SYNC" message payload was not described anywhere.

Even when the payload is empty, it is helpful to specify that
explicitly, as it prevents the reader from having to guess whether if
it's really empty, or otherwise somehow implicitly obvious.

The "Reply format" section is now "Messages and replies", and covers
both the reply format and the format of sent messages.
2021-05-20 21:47:43 +02:00
Vladimir Panteleev
8db3bef66d docs/ipc: Explicitly state that reply types correspond to message types
Help avoid some squinting to make sure everything actually matches.
2021-05-20 21:47:43 +02:00
Vladimir Panteleev
63099f7a83 docs/ipc: Fix inconsistent whitespace 2021-05-20 21:47:43 +02:00
Vladimir Panteleev
1f75e8d321 docs/ipc: Re-order and clarify reply format
- Make sure to place the description of the packet before the
  description of the payload.

- Describe the relationship of messages and replies.

- Add note on pipelining.
2021-05-20 21:47:43 +02:00
Vladimir Panteleev
73bcbbe1b1 docs/ipc: Fix grammar
Add missing "it". Also add two instances of "a", which sounds more
correct to me.
2021-05-20 21:47:43 +02:00
Vladimir Panteleev
bb6ee88440 docs/ipc: Clarify i3 --get-socketpath text 2021-05-20 21:47:43 +02:00
Kjetil Torgrim Homme
2245db63ab
add cross reference to directive default_border from command border (#4273)
Added a couple of examples to make usage clearer with a cursory glance.
2021-05-20 21:47:20 +02:00
Uli Schlachter
d65a7ed250
Drop xcb_flush() before xcb_aux_sync() (#4378)
xcb_flush() flushes xcb's output buffer. Thus, after this call, all
previous requests are surely written to the connection with the X11
server.

xcb_aux_sync() synchronises with the X11 server. It makes sure all
previous requests were sent to the X11 server and already processed. It
does this via free(xcb_get_input_focus_reply(xcb_get_input_focus())): It
sends a request and waits for its reply. It is guaranteed that the X11
server processes requests in-order.

This means that the sequence xcb_flush(); xcb_aux_sync() first writes
whatever is in the output buffer and then does another write for the
four bytes of the GetInputFocus request from xcb_aux_sync().

Put differently: xcb_flush(); xcb_aux_sync() doesn't do anything more
than just xcb_aux_sync(). In fact, it has slightly more overhead for the
same result.

Thus, this commit drops all calls to xcb_flush() immediately after
xcb_aux_sync().

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-05-20 21:44:13 +02:00
Uli Schlachter
60542da091
Do not "set" the wallpaper during startup (#4373)
"Set" the wallpaper during startup only sometimes

Since commit 4f5e0e7, i3 would take a screenshot and set that as the
background pixmap of the root window during startup. This is the easy
part of setting a proper X11 wallpaper.

The code in question was added because something either set the
background pixmap of the root window to NONE or the X11 server was
started with "-background none". This is apparently done by default by
e.g. gdm to avoid some flickering while the X11 server starts up.

This commit makes this code conditional: Only when no wallpaper is
detected is a screenshot taken.

Since I could not find any way to query the background of a window, a
more direct approach is taken to detect this situation: First, we find
some part of the root window that is not currently covered. Then we open
a white window there, close it again and grab a screenshot. If a
wallpaper is set, the X11 server will draw this wallpaper after the
window is closed and something else will be visible in the screenshot.

However, the wallpaper could have a white pixel at the tested position.
Thus, this procedure is repeated with a black window.

Only when this procedure produces two different pixel values is a
screenshot taken and set as the wallpaper.

Fixes: https://github.com/i3/i3/issues/4371
Fixes: https://github.com/i3/i3/issues/2869
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-05-20 21:37:35 +02:00
j-jzk
fcae64f7fd
Increase test timeout (#4416)
Default of 30 seconds can time-out on slower hardware
2021-04-29 15:59:23 +02:00
Ingo Bürk
91e751d5a2
Merge pull request #4411 from alarsyo/fix-broken-pango-link
docs: fix broken link to Pango documentation
2021-04-26 16:29:32 +02:00
Antoine Martin
00d4836ee4 docs: fix broken link to Pango documentation 2021-04-26 16:13:27 +02:00
Michael Stapelberg
9db03797da
fix crash with “layout default”: ipc.c won’t dump L_DEFAULT layout (#4409)
fixes #4408
2021-04-20 09:04:07 +02:00
Michael Stapelberg
c8158875b4
default config: use dex for XDG autostart (#4405)
fixes #4402
2021-04-17 15:26:45 +02:00
Ingo Bürk
9bf9cb9926
Merge pull request #4377 from lbonn/signed-container-positions
ipc: return signed int for container positions
2021-04-10 16:24:43 +02:00
lbonn
496364fdbf ipc: return signed int for container positions
If we use json as a language-agnostic representation, it makes sense to
use proper signed integers here.
2021-04-10 14:17:00 +02:00
Orestis Floros
fcf4c235d2
Merge pull request #4394 from jaykhandkar/fix-userguide
docs/userguide - comment out TODO line
2021-04-06 12:59:17 +02:00
Jay Khandkar
e150b99ba8 docs/userguide - comment out TODO line
commented out TODO line in userguide which was showing up in the
online documentation.
2021-03-28 15:34:59 +05:30
Ingo Bürk
39376a94ab
Merge pull request #4387 from ivanmilov/milov/ipc-floating-doc
Added floating field to _tree_reply in ipc documentation
2021-03-16 16:52:15 +01:00
Ivan Milov
52afb16391
Added floating field to _tree_reply in ipc documentation 2021-03-15 10:42:39 +01:00
Uli Schlachter
1c67683406 Make this sound less "X11 is horrible"
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-03-12 10:18:07 +01:00
Uli Schlachter
fd500ee99d Add a section on the sync IPC command
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-03-12 10:18:07 +01:00
Uli Schlachter
8a5eac3457 Improve the docs for I3_SYNC
I was confused by the previous state of the docs since I imagined that
there is still a race possible. Thus, the images are updated to
explicitly include the IPC reply from i3 (since that is an important
synchronisation component). I also tried to clarify some of the text.

Fixes: https://github.com/i3/i3/issues/4365
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-03-12 10:18:07 +01:00
Ingo Bürk
af2171d01d
Merge pull request #4363 from psychon/more-prefetch
Prefetch some information through xcb
2021-03-06 19:06:16 +01:00
Uli Schlachter
db5a7dc22a Only prefetch xinerama if it is likely needed
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-03-06 18:43:46 +01:00
Ingo Bürk
42c3dbe025
Merge pull request #4362 from psychon/no-temp-cairo-surface2
Some follow-up to
2021-03-06 11:10:57 +01:00
Uli Schlachter
f8bc7052ea Remove unused member from surface_t
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-03-06 09:27:15 +01:00
Uli Schlachter
bae1f4b354 Prefetch some information through xcb
This commit makes libxcb prefetch some information that will be needed
later anyway. This avoids some round-trips to the X11 server since the
information is already present when needed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-03-05 14:16:52 +01:00
Ingo Bürk
757b3dd573
Merge pull request #4361 from psychon/no-temp-cairo-surface
No temporary cairo surface for font drawing
2021-03-05 14:06:57 +01:00
Uli Schlachter
b23c8875f7 font: Get rid of temporary cairo surface
i3 actually manages to have two different cairo surfaces referring to
the same drawable. One comes from the code in draw_util. The second is
temporarily created while rendering text via draw_text(). No idea how
well cairo handles this case.

This commit instead changes the code to pass the already existing cairo
surface from the caller through.

This might or might not fix https://github.com/i3/i3/pull/4357. My
thinking here is that cairo now knows the actual size of the drawable
and thus does not clip the drawing to a smaller size.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-03-05 11:37:03 +01:00
Uli Schlachter
8d645d0de6 Remove draw_text_ascii()
This function is unused since commit fa488d721d from 2017.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-03-05 11:36:09 +01:00
Michael Stapelberg
7da136dca4 Update debian/changelog 2021-02-27 10:38:13 +01:00
Michael Stapelberg
98e0a07f15 Merge branch 'stable' into next 2021-02-27 10:38:13 +01:00
Michael Stapelberg
46bc841162 Merge branch 'release-4.19.2' 2021-02-27 10:38:13 +01:00
Michael Stapelberg
4ef47087d4 Restore non-git version suffix 2021-02-27 10:38:13 +01:00
Michael Stapelberg
ddebebd26b release i3 4.19.2 2021-02-27 10:37:57 +01:00
Michael Stapelberg
0e1a828003 cherry-pick release.sh changes into stable branch
related to https://github.com/i3/i3/issues/4350
2021-02-27 10:20:16 +01:00
Michael Stapelberg
b95bab0e34
mark travis/push-balto.sh as executable (#4347)
related to https://github.com/i3/i3/issues/4340
2021-02-13 10:10:59 +01:00
Michael Stapelberg
521949b567
travis: push i3 autobuild packages to balto instead of bintray (#4345)
related to https://github.com/i3/i3/issues/4340
2021-02-13 09:56:15 +01:00
Orestis Floros
5df0b4b571
Merge pull request #4336 from tbgiles/next
Clear framebuffer for containers with visible windows
2021-02-07 19:10:23 +01:00
Orestis Floros
e8949c7df1
Merge pull request #4338 from orestisfl/move-workspaces-to-multiple-outputs
Move workspaces to multiple outputs
2021-02-06 12:52:08 +01:00
Orestis Floros
8ff8db3c36
Accept multiple outputs in move container|workspace to output
Fixes #4337
2021-02-06 11:00:16 +01:00
Orestis Floros
f2243a7a90
Tests: Fix get_output_for_workspace
In the case of more than one workspaces in an output
2021-02-06 10:59:16 +01:00
Michael Stapelberg
36b6fef990 Merge branch 'release-4.19.1' 2021-02-01 09:04:01 +01:00
Michael Stapelberg
ab2a22a78b Update debian/changelog 2021-02-01 09:04:01 +01:00
Michael Stapelberg
001577c58c Set non-git version to 4.19.1-non-git. 2021-02-01 09:04:01 +01:00
Michael Stapelberg
33bbce6c38 Merge branch 'stable' into next 2021-02-01 09:04:01 +01:00