Commit Graph

7194 Commits

Author SHA1 Message Date
bb6ee88440 docs/ipc: Clarify i3 --get-socketpath text 2021-05-20 21:47:43 +02:00
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
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
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
fcae64f7fd Increase test timeout (#4416)
Default of 30 seconds can time-out on slower hardware
2021-04-29 15:59:23 +02:00
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
00d4836ee4 docs: fix broken link to Pango documentation 2021-04-26 16:13:27 +02:00
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
c8158875b4 default config: use dex for XDG autostart (#4405)
fixes #4402
2021-04-17 15:26:45 +02:00
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
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
fcf4c235d2 Merge pull request #4394 from jaykhandkar/fix-userguide
docs/userguide - comment out TODO line
2021-04-06 12:59:17 +02:00
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
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
52afb16391 Added floating field to _tree_reply in ipc documentation 2021-03-15 10:42:39 +01:00
1c67683406 Make this sound less "X11 is horrible"
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-03-12 10:18:07 +01:00
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
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
af2171d01d Merge pull request #4363 from psychon/more-prefetch
Prefetch some information through xcb
2021-03-06 19:06:16 +01:00
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
42c3dbe025 Merge pull request #4362 from psychon/no-temp-cairo-surface2
Some follow-up to
2021-03-06 11:10:57 +01:00
f8bc7052ea Remove unused member from surface_t
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-03-06 09:27:15 +01:00
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
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
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
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
7da136dca4 Update debian/changelog 2021-02-27 10:38:13 +01:00
98e0a07f15 Merge branch 'stable' into next 2021-02-27 10:38:13 +01:00
46bc841162 Merge branch 'release-4.19.2' 2021-02-27 10:38:13 +01:00
4ef47087d4 Restore non-git version suffix 2021-02-27 10:38:13 +01:00
ddebebd26b release i3 4.19.2 2021-02-27 10:37:57 +01:00
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
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
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
5df0b4b571 Merge pull request #4336 from tbgiles/next
Clear framebuffer for containers with visible windows
2021-02-07 19:10:23 +01:00
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
8ff8db3c36 Accept multiple outputs in move container|workspace to output
Fixes #4337
2021-02-06 11:00:16 +01:00
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
36b6fef990 Merge branch 'release-4.19.1' 2021-02-01 09:04:01 +01:00
ab2a22a78b Update debian/changelog 2021-02-01 09:04:01 +01:00
001577c58c Set non-git version to 4.19.1-non-git. 2021-02-01 09:04:01 +01:00
33bbce6c38 Merge branch 'stable' into next 2021-02-01 09:04:01 +01:00
0fb9123da9 release i3 4.19.1 2021-02-01 09:03:45 +01:00
77d5bbb9b5 Properly quote rofi call in i3 config 2021-02-01 08:54:48 +01:00
b35be84131 Comment-out duplicate i3-dmenu-desktop bindcode
Fixes #4304
2021-02-01 08:54:26 +01:00
0c09bc24ff Fix workspace assignements after output changes
Fix #4261

The previous method was modifying the same list it was iterating upon
causing an erronous iteration and thus not every workspace got assigned
back to were they should (only the first one).
2021-02-01 08:53:36 +01:00
09e2bdaeba Clear framebuffer on containers that are visible windows 2021-01-30 22:44:43 -08:00
ef12e9a5ab Merge pull request #4331 from ImranVirani/patch-1
Properly quote rofi call in i3 config
2021-01-29 16:20:15 +01:00
60213accae Properly quote rofi call in i3 config 2021-01-29 14:01:51 +01:00
62367c686d Merge pull request #4007 from xzfc/3981-client-machine
Match WM_CLIENT_MACHINE
2021-01-28 14:52:50 +01:00