Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • chengbo7135/xserver
  • wjp/xserver
  • DemiMarie/xserver
  • alanc/xserver
  • uvas/xserver
  • cl91/xserver
  • heymiaoO/xserver
  • oreaus/xserver
  • stapelberg/xserver
  • PaulKocialkowski/xserver
  • CendioOssman/xserver
  • wiz/xserver
  • maos20008/xserver
  • dougvj/xserver
  • mgorse1/xserver
  • gldrk/xserver
  • TMR5454/xserver
  • Kyawswat/xserver
  • hexiaodong/xserver
  • gilvbp/xserver
  • vliaskov/xserver
  • aarondill/xserver
  • zzyiwei/xserver
  • kleinerm/xserver
  • jcherry/xserver
  • jcristau/xserver
  • nathankidd/xserver
  • jexposit/xserver
  • refi_64/xserver
  • kbrenneman/xserver
  • kupper.pa/xserver
  • LickmeDown/xserver
  • zboszor/xserver
  • jadahl/xserver
  • shadeslayer/xserver
  • mherrb/xserver
  • Julia/xserver
  • twaik/xserver
  • fvalasiad/xserver
  • zzxyb/xserver
  • HermannSW/xserver
  • erwinou/xserver
  • ekurzinger/xserver
  • nacho.resa/xserver
  • agoins/xserver
  • NSUTanghaixiang/xserver
  • p12tic/xserver
  • huxd1532/xserver
  • keithp/xserver
  • vinilokorlok/xserver
  • bbeckett/xserver
  • dslater38/xserver
  • zzag/xserver
  • emersion/xserver
  • djlucas/xserver
  • ccullumbine2018/xserver
  • daniels/xserver
  • llandwerlin/xserver
  • matt335672/xserver
  • doraskayo/xserver
  • afett/xserver
  • XDXTHX/xserver
  • xexaxo/xserver
  • ecurtin/xserver
  • rbernon/xserver
  • pekdon/xserver
  • karolherbst/xserver
  • russellcnv/xserver
  • mbiebl/xserver
  • orbea/xserver
  • vsyrjala/xserver
  • lyudess/xserver
  • manu/xserver
  • lucmann/xserver
  • tholin/xserver
  • yarivb/xserver
  • tmlind/xserver
  • chema/xserver
  • J-Bu/xserver
  • chenhuacai/xserver
  • E5ten/xserver
  • haagch/xserver
  • whot/xserver
  • strassek/xserver
  • mntmn/xserver
  • liyi42/xserver
  • YusufKhan-gamedev/xserver
  • iv-m/xserver
  • vanvugt/xserver
  • Rui511/xserver
  • catap/xserver
  • tjbp/xserver
  • webi123/xserver
  • noblock/xserver
  • freemangordon/xserver
  • xdandys/xserver
  • jbeich/xserver
  • zeising/xserver
  • romangg/xserver
  • pq/xserver
  • azhadchenko/xserver
  • Emantor/xserver
  • carlosg/xserver
  • kwg/xserver
  • pichika/xserver
  • klniu/xserver
  • TAAPArthur/xserver
  • sjoerd/xserver
  • Sjecai2/xserver
  • jturney/xserver
  • pkubaj/xserver
  • os369510/xserver
  • Zamundaaa/xserver
  • Gorg/xserver
  • lkundrak/xserver
  • niveditharau/xserver
  • ForTheReallys/xserver
  • jmonteiro/xserver
  • jocelyn/xserver
  • ThatMG393/xserver
  • fweimer/xserver
  • mlankhorst/xserver
  • marv/xserver
  • dbn/xserver
  • mattrope/xserver
  • coypoop/xserver
  • mwyraz/xserver
  • frog/xserver
  • 3v1n0/xserver
  • awilfox/xserver
  • muesli4/xserver
  • rarbab/xserver
  • yshui/xserver
  • jannau/xserver
  • mikeroyal/xserver
  • andrebsguedes/xserver
  • JeffyCN/xserver
  • ipominov/xserver
  • gtrentalancia/xserver
  • josch/xserver
  • lucyllewy/xserver
  • tomty89/xserver
  • qarmin/xserver
  • tagr/xserver
  • zwenna/xserver
  • bkylerussell/xserver
  • mupuf/xserver
  • zubzub/xserver
  • galaxytgtabiday/xserver
  • OlCe/xserver
  • ashafer/xserver
  • dengbo/xserver
  • valpackett/xserver
  • andreyknyazev077/xserver
  • antonovitch/xserver
  • contactshashanksharma/xserver-fork-shashank
  • akihiko.odaki/xserver
  • sknsean/xserver
  • rnpnr/xserver
  • hitong602/xserver
  • halfline/xserver
  • ismailsiege/xserver
  • dongwonk/xserver
  • Fatton1/xserver
  • GermanAizek/xserver
  • daenzer/xserver
  • FeepingCreature/xserver
  • mvlad/xserver
  • puleglot/xserver
  • smelenius/xserver
  • sewn/xserver
  • kaichuan.hsieh/xserver
  • SimonPilkington/xserver
  • adamdruppe/xserver
  • floppym/xserver
  • trevdave/xserver
  • luke-jr/xserver
  • headrush/xserver
  • davidriley/xserver
  • heitbaum/xserver
  • mrisaacb/xserver
  • goosen78/xserver
  • Ma/xserver
  • gmbr3/xserver
  • tsutsui/xserver
  • sherrodejjohnson/xserver
  • hassoon1986/xserver
  • lanodan/xserver
  • ydc-dadada/xserver
  • wengxt/xserver
  • icenowy/xserver
  • denisfa/xserver
  • StarsGreen/xserver
  • adamjrichter/xserver
  • bigon/xserver
  • djacewicz/xserver
  • davidre/xserver
  • kylin0061/xserver
  • arrowd/xserver
  • ernstp/xserver
  • bbrezillon/xserver
  • penguin42/xserver
  • anarsoul/xserver
  • marvinjr35/xserver
  • gerddie/xserver
  • xry111/xserver
  • psyruss85/xserver
  • volkanorhan/xserver
  • luporl/xserver
  • cbur201592/xserver
  • bphaslett/xserver
  • guillem/xserver
  • haihao/xserver
  • peterh/xserver
  • miztake/xserver
  • zaps166/xserver
  • lostgoat/xserver
  • vfjpl/xserver
  • bentiss/xserver
  • rilian-la-te/xserver
  • wujiangGitHub/xserver
  • cubanismo/xserver
  • arichardson/xserver
  • schreibemirhalt/xserver
  • jsg/xserver
  • karlosrangel337/xserver
  • knisht/xserver
  • manuelcrack642/xserver
  • ross/xserver
  • topimiettinen/xserver
  • davidedmundson/xserver
  • DPA/xserver
  • dkorkmazturk/xserver
  • karamjameelmoore/xserver
  • lihongtao/xserver
  • sthibaul/xserver
  • RyzenDew/xserver
  • christian-rauch/xserver
  • Vivek/xserver
  • peigongdsd/xserver
  • peng.jin/xserver
  • alagner/xserver
  • mehdigh419/xserver
  • dixler/xserver
  • BBaoVanC/xserver
  • Drakulix/xserver
  • Acidburn0zzz/xserver
  • bafanahub/xserver
  • benpicco/xserver
  • yangxiaojuan-loongson/xserver
  • kaocher82/xserver
  • pepp/xserver
  • cgzones/xserver
  • luyn/xserver
  • 1740301466jxz/xserver
  • ids1024/xserver
  • svalaskevicius/xserver
  • ZhiJie.Zhang/xserver
  • metux/xserver
  • eschwartz/xserver
  • jayantpranjal0/xserver
  • hmazlan/xserver
  • kerneltoast/xserver
  • Michaelypk/xserver
  • dottedmag/xserver
  • aplattner/xserver
  • sergiomb/xserver
  • looi/xserver
  • robclark/xserver
  • tzimmermann/xserver
  • vitoux.pascal/xserver
  • aditj/xserver
  • kennylevinsen/xserver
  • Kishore409/xserver
  • Daasin/xserver
  • dirbaio/xserver
  • xinbowang/xserver
  • mwei/xserver
  • SpikyCaterpillar1/xserver
  • devin11911191/xserver
  • xorg/xserver
  • alex-tu-cc/xserver
  • kaniini/xserver
  • jcourreges/xserver
  • n3rdopolis/xserver
  • zagursky/xserver
  • thesamesam/xserver
  • anholt/xserver
  • themaister/xserver
  • jrtc27/xserver
  • JoseExposito/xserver
  • Hi-Angel/xserver
  • City-busz/xserver
  • ydirson/xserver
  • dawnhan/xserver
  • avolkov/xserver
  • meMuszr/xserver
  • dk/xserver
  • cooperch/xserver
  • Tuetuopay/xserver
  • gabifalk/xserver
  • jeremyhu/xserver
  • 1480c1/xserver
  • Spintzyk/xserver
  • MisterDA/xserver
  • starnight/xserver
  • abono/xserver
  • ajax/xserver
  • dougg3/xserver
  • chenx_dust/xserver
  • EXtremeExploit/xserver
  • jwrdegoede/xserver
  • road2react/xserver
  • acelan/xserver
  • airlied/xserver
  • gfxstrand/xorg-xserver
  • justazarsky/xserver
  • sri-ka1ki/xserver
  • rgfernandes/xserver
  • lynxeye/xserver
  • tintou/xserver
  • mattst88/xserver
  • rmader/xserver
  • linkmauve/xserver
  • kamarul6401/xserver
  • andy-zetier/xserver
  • gsittyz/xserver
  • bernhardu/xserver
  • causztic/xserver
  • cpmichael/modesetting
  • ryanneph/xserver
  • zhangyaning/xserver
  • olv/xserver
  • hongaoo/xserver
  • LiChenG-P/xserver
  • Ivaniku/x-taylan
  • dkg/xserver
  • ofourdan/xserver
  • mahkoh/xserver
  • AkiSakurai/xserver
  • msizanoen1/xserver
341 results
Show changes
Commits on Source (13)
#
# X.Org module default exclusion patterns
# The next section if for module specific patterns
#
# Do not edit the following section
# GNU Build System (Autotools)
aclocal.m4
autom4te.cache/
autoscan.log
ChangeLog
compile
config.guess
config.h
config.h.in
config.log
config-ml.in
config.py
config.status
config.status.lineno
config.sub
configure
configure.scan
depcomp
.deps/
INSTALL
install-sh
.libs/
libtool
libtool.m4
ltmain.sh
lt~obsolete.m4
ltoptions.m4
ltsugar.m4
ltversion.m4
Makefile
Makefile.in
mdate-sh
missing
mkinstalldirs
*.pc
py-compile
stamp-h?
symlink-tree
test-driver
texinfo.tex
ylwrap
# Do not edit the following section
# Edit Compile Debug Document Distribute
*~
*.[0-9]
*.[0-9]x
*.bak
*.bin
core
*.dll
*.exe
*-ISO*.bdf
*-JIS*.bdf
*-KOI8*.bdf
*.kld
*.ko
*.ko.cmd
*.lai
*.l[oa]
*.[oa]
*.obj
*.swp
*.patch
*.so
*.pcf.gz
*.pdb
*.tar.bz2
*.tar.gz
#
# Add & Override patterns for xserver
#
# Edit the following section as needed
# For example, !report.pc overrides *.pc. See 'man gitignore'
#
doltcompile
doltlibtool
xserver.ent
tags
......@@ -378,7 +378,7 @@ glamor_copy_fbo_fbo_draw(DrawablePtr src,
if (gc && !glamor_set_planemask(gc->depth, gc->planemask))
goto bail_ctx;
if (!glamor_set_alu(screen, gc ? gc->alu : GXcopy))
if (!glamor_set_alu(dst, gc ? gc->alu : GXcopy))
goto bail_ctx;
if (bitplane && !glamor_priv->can_copyplane)
......@@ -529,7 +529,7 @@ glamor_copy_fbo_fbo_temp(DrawablePtr src,
if (gc && !glamor_set_planemask(gc->depth, gc->planemask))
goto bail_ctx;
if (!glamor_set_alu(screen, gc ? gc->alu : GXcopy))
if (!glamor_set_alu(dst, gc ? gc->alu : GXcopy))
goto bail_ctx;
/* Find the size of the area to copy
......
......@@ -971,7 +971,7 @@ glamor_generate_radial_gradient_picture(ScreenPtr screen,
0))
goto GRADIENT_FAIL;
glamor_set_alu(screen, GXcopy);
glamor_set_alu(&pixmap->drawable, GXcopy);
/* Set all the stops and colors to shader. */
if (stops_count > RADIAL_SMALL_STOPS) {
......@@ -1288,7 +1288,7 @@ glamor_generate_linear_gradient_picture(ScreenPtr screen,
1))
goto GRADIENT_FAIL;
glamor_set_alu(screen, GXcopy);
glamor_set_alu(&pixmap->drawable, GXcopy);
/* Normalize the PTs. */
glamor_set_normalize_pt(xscale, yscale,
......
......@@ -120,8 +120,9 @@ glamor_set_planemask(int depth, unsigned long planemask)
}
Bool
glamor_set_alu(ScreenPtr screen, unsigned char alu)
glamor_set_alu(DrawablePtr drawable, unsigned char alu)
{
ScreenPtr screen = drawable->pScreen;
glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
if (glamor_priv->is_gles) {
......@@ -135,6 +136,21 @@ glamor_set_alu(ScreenPtr screen, unsigned char alu)
glDisable(GL_COLOR_LOGIC_OP);
return TRUE;
}
switch (alu) {
case GXnoop:
case GXor:
case GXset:
/* These leave the alpha channel at 1.0 */
break;
default:
if (glamor_drawable_effective_depth(drawable) == 24 &&
glamor_get_drawable_pixmap(drawable)->drawable.depth == 32) {
glamor_fallback("ALU %x not supported with mixed depth\n", alu);
return FALSE;
}
}
glEnable(GL_COLOR_LOGIC_OP);
switch (alu) {
case GXclear:
......
......@@ -668,7 +668,7 @@ void glamor_set_destination_pixmap_fbo(glamor_screen_private *glamor_priv, glamo
* */
void glamor_set_destination_pixmap_priv_nc(glamor_screen_private *glamor_priv, PixmapPtr pixmap, glamor_pixmap_private *pixmap_priv);
Bool glamor_set_alu(ScreenPtr screen, unsigned char alu);
Bool glamor_set_alu(DrawablePtr drawable, unsigned char alu);
Bool glamor_set_planemask(int depth, unsigned long planemask);
RegionPtr glamor_bitmap_to_region(PixmapPtr pixmap);
......
......@@ -1235,7 +1235,7 @@ glamor_composite_with_shader(CARD8 op,
glamor_set_destination_pixmap_priv_nc(glamor_priv, dest_pixmap, dest_pixmap_priv);
glamor_composite_set_shader_blend(glamor_priv, dest_pixmap_priv, &key, shader, &op_info);
glamor_set_alu(screen, GXcopy);
glamor_set_alu(dest->pDrawable, GXcopy);
glamor_priv->has_source_coords = key.source != SHADER_SOURCE_SOLID;
glamor_priv->has_mask_coords = (key.mask != SHADER_MASK_NONE &&
......
......@@ -143,7 +143,7 @@ glamor_set_solid(DrawablePtr drawable,
pixel = gc->fgPixel;
if (!glamor_set_alu(drawable->pScreen, alu)) {
if (!glamor_set_alu(drawable, alu)) {
switch (gc->alu) {
case GXclear:
pixel = 0;
......@@ -209,7 +209,7 @@ glamor_set_tiled(DrawablePtr drawable,
GLint offset_uniform,
GLint size_inv_uniform)
{
if (!glamor_set_alu(drawable->pScreen, gc->alu))
if (!glamor_set_alu(drawable, gc->alu))
return FALSE;
if (!glamor_set_planemask(gc->depth, gc->planemask))
......
......@@ -447,7 +447,7 @@ glamor_xv_render(glamor_port_private *port_priv, int id)
off[2] = Loff * yco + Coff * (uco[2] + vco[2]) + bright;
gamma = 1.0;
glamor_set_alu(screen, GXcopy);
glamor_set_alu(&pixmap->drawable, GXcopy);
for (i = 0; i < 3; i++) {
if (port_priv->src_pix[i]) {
......
......@@ -124,6 +124,16 @@ support touch input.
Force additional non-native modes to be exposed when viewporter is not
supported by the Wayland compositor.
.TP 8
.B \-output \fIname\fP
Specifies on which output \fIXwayland\fP fullscreen rootful should be placed.
The name must match the name of an existing Wayland output (output names can
be found using wayland-info).
If no matching output can be found, the Wayland compositor will decide on which
output the fullscreen rootful \fIXwayland\fP window will be placed.
This option has no effect if \fIXwayland\fP is not running fullscreen rootful.
.TP 8
.B \-rootless
Run \fIXwayland\fP rootless, so that X clients integrate seamlessly with
Wayland clients in a Wayland desktop. That requires the Wayland server
......@@ -159,4 +169,4 @@ the name of the display of the Wayland server.
.B XWAYLAND_NO_GLAMOR
disable glamor and DRI3 support in \fIXwayland\fP, for testing purposes.
.SH "SEE ALSO"
General information: \fIX\fP(@miscmansuffix@)
General information: \fIX\fP(@miscmansuffix@), \fIwayland-info\fP(@miscmansuffix@)
......@@ -559,7 +559,7 @@ xwl_glamor_eglstream_post_damage(struct xwl_window *xwl_window,
* won't actually draw to it
*/
xwl_glamor_egl_make_current(xwl_screen);
glamor_set_alu(xwl_screen->screen, GXcopy);
glamor_set_alu(&pixmap->drawable, GXcopy);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
......
......@@ -598,10 +598,24 @@ xwl_output_set_emulated_mode(struct xwl_output *xwl_output, ClientPtr client,
}
static void
apply_output_change(struct xwl_output *xwl_output)
maybe_update_fullscreen_state(struct xwl_output *xwl_output)
{
struct xwl_screen *xwl_screen = xwl_output->xwl_screen;
struct xwl_window *xwl_window;
if (xwl_screen->fullscreen) {
/* The root window may not yet be created */
if (xwl_screen->screen->root) {
xwl_window = xwl_window_get(xwl_screen->screen->root);
xwl_window_rootful_update_fullscreen(xwl_window, xwl_output);
}
}
}
static void
apply_output_change(struct xwl_output *xwl_output)
{
struct xwl_screen *xwl_screen = xwl_output->xwl_screen;
struct xwl_output *it;
int mode_width, mode_height, count;
int width = 0, height = 0, has_this_output = 0;
......@@ -661,18 +675,14 @@ apply_output_change(struct xwl_output *xwl_output)
RRTellChanged(xwl_screen->screen);
/* If running rootful and fullscreen, make sure to match the new setup */
if (xwl_screen->fullscreen) {
/* The root window may not yet be created */
if (xwl_screen->screen->root) {
xwl_window = xwl_window_get(xwl_screen->screen->root);
xwl_window_rootful_update_fullscreen(xwl_window, xwl_output);
}
}
maybe_update_fullscreen_state(xwl_output);
}
static void
xwl_output_set_name(struct xwl_output *xwl_output, const char *name)
{
struct xwl_screen *xwl_screen = xwl_output->xwl_screen;
if (xwl_output->randr_output == NULL)
return; /* rootful */
......@@ -684,14 +694,21 @@ xwl_output_set_name(struct xwl_output *xwl_output, const char *name)
snprintf(xwl_output->randr_output->name, MAX_OUTPUT_NAME, "%s", name);
xwl_output->randr_output->nameLength = strlen(xwl_output->randr_output->name);
if (xwl_screen->output_name && strcmp(name, xwl_screen->output_name) == 0)
maybe_update_fullscreen_state(xwl_output);
}
static void
output_handle_done(void *data, struct wl_output *wl_output)
{
struct xwl_output *xwl_output = data;
struct xwl_screen *xwl_screen = xwl_output->xwl_screen;
xwl_output->wl_output_done = TRUE;
if (xwl_screen->fixed_output)
return;
/* Apply the changes from wl_output only if both "done" events are received,
* if xdg-output is not supported or if xdg-output version is high enough.
*/
......@@ -753,8 +770,13 @@ static void
xdg_output_handle_done(void *data, struct zxdg_output_v1 *xdg_output)
{
struct xwl_output *xwl_output = data;
struct xwl_screen *xwl_screen = xwl_output->xwl_screen;
xwl_output->xdg_output_done = TRUE;
if (xwl_screen->fixed_output)
return;
if (xwl_output->wl_output_done &&
zxdg_output_v1_get_version(xdg_output) < 3)
apply_output_change(xwl_output);
......@@ -821,12 +843,33 @@ xwl_output_from_wl_output(struct xwl_screen *xwl_screen,
return NULL;
}
struct xwl_output *
xwl_output_get_output_from_name(struct xwl_screen *xwl_screen, const char *name)
{
struct xwl_output *xwl_output;
if (name == NULL)
return NULL;
xorg_list_for_each_entry(xwl_output, &xwl_screen->output_list, link) {
if (xwl_output->randr_output == NULL)
continue;
if (strcmp(xwl_output->randr_output->name, name) == 0) {
return xwl_output;
}
}
return NULL;
}
struct xwl_output *
xwl_output_create(struct xwl_screen *xwl_screen, uint32_t id,
Bool with_xrandr, uint32_t version)
Bool connected, uint32_t version)
{
struct xwl_output *xwl_output;
char name[MAX_OUTPUT_NAME] = { '\0', };
char name[MAX_OUTPUT_NAME] = { 0 };
xwl_output = calloc(1, sizeof *xwl_output);
if (xwl_output == NULL) {
......@@ -846,31 +889,31 @@ xwl_output_create(struct xwl_screen *xwl_screen, uint32_t id,
xwl_output->xwl_screen = xwl_screen;
if (with_xrandr) {
xwl_output->randr_crtc = RRCrtcCreate(xwl_screen->screen, xwl_output);
if (!xwl_output->randr_crtc) {
ErrorF("Failed creating RandR CRTC\n");
goto err;
}
RRCrtcSetRotations (xwl_output->randr_crtc, ALL_ROTATIONS);
xwl_output->randr_crtc = RRCrtcCreate(xwl_screen->screen, xwl_output);
if (!xwl_output->randr_crtc) {
ErrorF("Failed creating RandR CRTC\n");
goto err;
}
RRCrtcSetRotations (xwl_output->randr_crtc, ALL_ROTATIONS);
/* Allocate MAX_OUTPUT_NAME data for the output name, all filled with zeros */
xwl_output->randr_output = RROutputCreate(xwl_screen->screen, name,
MAX_OUTPUT_NAME, xwl_output);
if (!xwl_output->randr_output) {
ErrorF("Failed creating RandR Output\n");
goto err;
}
/* Set the default output name to a sensible value */
snprintf(name, MAX_OUTPUT_NAME, "XWAYLAND%d",
xwl_screen_get_next_output_serial(xwl_screen));
xwl_output_set_name(xwl_output, name);
xwl_output_set_emulated(xwl_output);
RRCrtcGammaSetSize(xwl_output->randr_crtc, 256);
RROutputSetCrtcs(xwl_output->randr_output, &xwl_output->randr_crtc, 1);
RROutputSetConnection(xwl_output->randr_output, RR_Connected);
/* Allocate MAX_OUTPUT_NAME data for the output name, all filled with zeros */
xwl_output->randr_output = RROutputCreate(xwl_screen->screen, name,
MAX_OUTPUT_NAME, xwl_output);
if (!xwl_output->randr_output) {
ErrorF("Failed creating RandR Output\n");
goto err;
}
/* Set the default output name to a sensible value */
snprintf(name, MAX_OUTPUT_NAME, "XWAYLAND%d",
xwl_screen_get_next_output_serial(xwl_screen));
xwl_output_set_name(xwl_output, name);
xwl_output_set_emulated(xwl_output);
RRCrtcGammaSetSize(xwl_output->randr_crtc, 256);
RROutputSetCrtcs(xwl_output->randr_output, &xwl_output->randr_crtc, 1);
RROutputSetConnection(xwl_output->randr_output,
connected ? RR_Connected : RR_Disconnected);
/* We want the output to be in the list as soon as created so we can
* use it when binding to the xdg-output protocol...
*/
......@@ -1166,6 +1209,7 @@ Bool
xwl_screen_init_randr_fixed(struct xwl_screen *xwl_screen)
{
struct xwl_output *xwl_output;
char name[MAX_OUTPUT_NAME] = { 0 };
rrScrPrivPtr rp;
RRModePtr mode;
......@@ -1184,7 +1228,10 @@ xwl_screen_init_randr_fixed(struct xwl_screen *xwl_screen)
rp->rrGetInfo = xwl_randr_get_info;
rp->rrSetConfig = xwl_randr_set_config_fixed;
xwl_output->randr_output = RROutputCreate(xwl_screen->screen, "XWAYLAND0", 9, NULL);
snprintf(name, MAX_OUTPUT_NAME, "XWAYLAND%d",
xwl_screen_get_next_output_serial(xwl_screen));
xwl_output->randr_output = RROutputCreate(xwl_screen->screen, name,
strlen(name), NULL);
if (!xwl_output->randr_output) {
ErrorF("Failed to create RandR output\n");
goto err;
......
......@@ -86,9 +86,11 @@ void xwl_output_set_mode_fixed(struct xwl_output *xwl_output,
struct xwl_output *xwl_output_from_wl_output(struct xwl_screen *xwl_screen,
struct wl_output* wl_output);
struct xwl_output *xwl_output_get_output_from_name(struct xwl_screen *xwl_screen,
const char *name);
struct xwl_output *xwl_output_create(struct xwl_screen *xwl_screen,
uint32_t id, Bool with_xrandr,
uint32_t id, Bool connected,
uint32_t version);
void xwl_output_destroy(struct xwl_output *xwl_output);
......
......@@ -253,6 +253,7 @@ xwl_close_screen(ScreenPtr screen)
wl_display_disconnect(xwl_screen->display);
screen->CloseScreen = xwl_screen->CloseScreen;
free(xwl_screen);
return screen->CloseScreen(screen);
......@@ -846,6 +847,9 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
use_fixed_size = 1;
xwl_screen->fullscreen = 1;
}
else if (strcmp(argv[i], "-output") == 0) {
xwl_screen->output_name = argv[i + 1];
}
else if (strcmp(argv[i], "-host-grab") == 0) {
xwl_screen->host_grab = 1;
xwl_screen->has_grab = 1;
......
......@@ -145,6 +145,7 @@ struct xwl_screen {
int libdecor_fd;
struct libdecor *libdecor_context;
#endif
const char *output_name;
};
/* Apps which use randr/vidmode to change the mode when going fullscreen,
......
......@@ -319,8 +319,11 @@ xwl_window_get_output(struct xwl_window *xwl_window)
struct xwl_screen *xwl_screen = xwl_window->xwl_screen;
struct xwl_output *xwl_output;
xwl_output = xwl_output_from_wl_output(xwl_screen, xwl_window->wl_output);
xwl_output = xwl_output_get_output_from_name(xwl_screen, xwl_screen->output_name);
if (xwl_output)
return xwl_output;
xwl_output = xwl_output_from_wl_output(xwl_screen, xwl_window->wl_output);
if (xwl_output)
return xwl_output;
......
......@@ -94,6 +94,7 @@ ddxUseMsg(void)
ErrorF("-fullscreen run fullscreen when rootful\n");
ErrorF("-geometry WxH set Xwayland window size when rootful\n");
ErrorF("-host-grab disable host keyboard shortcuts when rootful\n");
ErrorF("-output specify which output to use for fullscreen when rootful\n");
ErrorF("-wm fd create X client for wm on given fd\n");
ErrorF("-initfd fd add given fd as a listen socket for initialization clients\n");
ErrorF("-listenfd fd add given fd as a listen socket\n");
......@@ -262,6 +263,10 @@ ddxProcessArgument(int argc, char *argv[], int i)
else if (strcmp(argv[i], "-enable-ei-portal") == 0) {
return 1;
}
else if (strcmp(argv[i], "-output") == 0) {
CHECK_FOR_REQUIRED_ARGUMENTS(1);
return 2;
}
return 0;
}
......