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)
  • Enrico Weigelt, metux IT consult .'s avatar
    xfree86: os-support: bsd: fix warning on old-style function definition · 0db30946
    Enrico Weigelt, metux IT consult . authored and Marge Bot's avatar Marge Bot committed
    
    Fix compiler warnings:
    
    ../hw/xfree86/os-support/bsd/bsd_VTsw.c: In function ‘xf86VTSwitchPending’:
    ../hw/xfree86/os-support/bsd/bsd_VTsw.c:56:1: warning: old-style function definition [-Wold-style-definition]
       56 | xf86VTSwitchPending()
          | ^~~~~~~~~~~~~~~~~~~
    ./hw/xfree86/os-support/bsd/bsd_VTsw.c: In function ‘xf86VTSwitchAway’:
    ./hw/xfree86/os-support/bsd/bsd_VTsw.c:67:1: warning: old-style function definition [-Wold-style-definition]
       67 | xf86VTSwitchAway()
          | ^~~~~~~~~~~~~~~~
    ../hw/xfree86/os-support/bsd/bsd_VTsw.c: In function ‘xf86VTSwitchTo’:
    ../hw/xfree86/os-support/bsd/bsd_VTsw.c:82:1: warning: old-style function definition [-Wold-style-definition]
       82 | xf86VTSwitchTo()
          | ^~~~~~~~~~~~~~
    
    ../hw/xfree86/os-support/bsd/bsd_init.c: In function ‘xf86OpenConsole’:
    ../hw/xfree86/os-support/bsd/bsd_init.c:153:1: warning: old-style function definition [-Wold-style-definition]
      153 | xf86OpenConsole()
          | ^~~~~~~~~~~~~~~
    
    ../hw/xfree86/os-support/bsd/bsd_init.c: In function ‘xf86OpenPccons’:
    ../hw/xfree86/os-support/bsd/bsd_init.c:320:1: warning: old-style function definition [-Wold-style-definition]
      320 | xf86OpenPccons()
          | ^~~~~~~~~~~~~~
    ../hw/xfree86/os-support/bsd/bsd_init.c: In function ‘xf86OpenPcvt’:
    ../hw/xfree86/os-support/bsd/bsd_init.c:451:1: warning: old-style function definition [-Wold-style-definition]
      451 | xf86OpenPcvt()
          | ^~~~~~~~~~~~
    
    ../hw/xfree86/os-support/bsd/bsd_init.c: In function ‘xf86OpenWScons’:
    ../hw/xfree86/os-support/bsd/bsd_init.c:563:1: warning: old-style function definition [-Wold-style-definition]
      563 | xf86OpenWScons()
          | ^~~~~~~~~~~~~~
    ../hw/xfree86/os-support/bsd/bsd_init.c: In function ‘xf86CloseConsole’:
    ../hw/xfree86/os-support/bsd/bsd_init.c:594:1: warning: old-style function definition [-Wold-style-definition]
      594 | xf86CloseConsole()
          | ^~~~~~~~~~~~~~~~
    ../hw/xfree86/os-support/bsd/bsd_init.c: In function ‘xf86UseMsg’:
    ../hw/xfree86/os-support/bsd/bsd_init.c:671:1: warning: old-style function definition [-Wold-style-definition]
      671 | xf86UseMsg()
          | ^~~~~~~~~~
    
    Signed-off-by: Enrico Weigelt, metux IT consult .'s avatarEnrico Weigelt, metux IT consult <info@metux.net>
    Part-of: <xorg/xserver!1445>
    0db30946
  • Michel Dänzer's avatar
    xwayland: Use xwl_window for tracking focus/touch · 59a02591
    Michel Dänzer authored and Marge Bot's avatar Marge Bot committed
    Slightly simpler, and might work better in some cases when X windows
    get reparented.
    
    Part-of: <xorg/xserver!1300>
    59a02591
  • Michel Dänzer's avatar
    xwayland: Rename xwl_window::window to ::toplevel · 972d5af5
    Michel Dänzer authored and Marge Bot's avatar Marge Bot committed
    It's always the toplevel window, i.e. either the root window or a child
    of it.
    
    Preparation for later commits, no functional change.
    
    v2: (Olivier Fourdan)
    * Fix debug build.
    * Add comment describing ::toplevel.
    
    Part-of: <xorg/xserver!1300>
    972d5af5
  • Michel Dänzer's avatar
    xwayland: Return struct xwl_window * from ensure_surface_for_window · a562d01a
    Michel Dänzer authored and Marge Bot's avatar Marge Bot committed
    Preparation for later commits, no functional change intended.
    
    v2:
    * Leave register_damage call unchanged in this commit. (Olivier Fourdan)
    
    Part-of: <xorg/xserver!1300>
    a562d01a
  • Michel Dänzer's avatar
    xwayland: Call register_damage depending on ensure_surface_for_window · 07f60326
    Michel Dänzer authored and Marge Bot's avatar Marge Bot committed
    Preparation for next commit.
    
    This might change behaviour for non-InputOutput top-level windows.
    ensure_surface_for_window getting called and returning non-NULL for
    those would seem like a pre-existing bug though.
    
    Part-of: <xorg/xserver!1300>
    07f60326
  • Michel Dänzer's avatar
    xwayland: Use xwl_window for damage closure · d3448f7a
    Michel Dänzer authored and Marge Bot's avatar Marge Bot committed
    Preparation for later commits, no functional change intended.
    
    Part-of: <xorg/xserver!1300>
    d3448f7a
  • Michel Dänzer's avatar
    xwayland: Pass xwl_window to xwl_glamor_dri3_syncobj_passthrough · db248682
    Michel Dänzer authored and Marge Bot's avatar Marge Bot committed
    Preparation for later changes, no functional change intended.
    
    Part-of: <xorg/xserver!1300>
    db248682
  • Michel Dänzer's avatar
    xwayland: Add xwl_window::surface_window · 3a0fc268
    Michel Dänzer authored and Marge Bot's avatar Marge Bot committed
    It may track a non-toplevel window which fully covers the area of the
    window pixmap / Wayland surface. It is now used instead of
    xwl_window::toplevel for updating the Wayland surface contents.
    
    The surface_window can now hit the Present page flip path while it's
    automatically redirected.
    
    v2:
    * Use "surface_window" instead of "surf_win". (Olivier Fourdan)
    * Add comment describing surface_window, and describe what
      surface_window/toplevel are useful for respectively. (Olivier Fourdan)
    * Use surface_window in xwl_realize_window.
    v3:
    * Backtrack up to the closest opaque ancestor in
      xwl_window_update_surface_window. (Olivier Fourdan)
    v4:
    * Clean up logic for determining the surface window in
      xwl_window_update_surface_window, and document it better.
    * Handle window_get_damage(xwl_window->surface_window) returning NULL
      in xwl_window_update_surface_window.
    * Call xwl_window_update_surface_window after xwl_window_buffers_init
      in ensure_surface_for_window, since the former may call
      xwl_window_buffers_dispose.
    * Rename surf/win_pix to surface/window_pixmap in
      xwl_window_update_surface_window.
    
    Part-of: <xorg/xserver!1300>
    3a0fc268
  • Michel Dänzer's avatar
    xwayland: Use ConfigNotify screen hook instead of ResizeWindow · fa7b1c20
    Michel Dänzer authored and Marge Bot's avatar Marge Bot committed
    Preparation for later commits, no functional change intended.
    
    Part-of: <xorg/xserver!1300>
    fa7b1c20
  • Michel Dänzer's avatar
    xwayland/present: Add xwl_present_maybe_(un)redirect_window · fca63f8f
    Michel Dänzer authored and Marge Bot's avatar Marge Bot committed
    A later commit will use these to (un)redirect the surface window on
    demand.
    
    Not used yet, so no functional change intended.
    
    v2:
    * Use "surface_window_damage" instead of "surf_win_damage".
      (Olivier Fourdan)
    * Slightly simplify logic in xwl_unrealize_window.
    v3:
    * Add comment in xwl_present_maybe_unredirect_window explaining why we
      use a timer. (Olivier Fourdan)
    v4:
    * Rename unredir_timer field to unredirect_timer.
    
    Part-of: <xorg/xserver!1300>
    fca63f8f
  • Michel Dänzer's avatar
    xwayland: Add SourceValidate hook · aa05f38f
    Michel Dänzer authored and Marge Bot's avatar Marge Bot committed
    A later commit will use it to ensure the toplevel window pixmap has
    valid contents.
    
    It's hooked up only while any xwl_window->surface_window_damage points
    to a non-empty region. So far it's always NULL, so no functional change
    intended.
    
    v2:
    * Fix trailing whitespace. (Olivier Fourdan)
    v3:
    * Use toplevel local variable more in xwl_window_update_surface_window.
    
    Part-of: <xorg/xserver!1300>
    aa05f38f
  • Michel Dänzer's avatar
    xwayland/present: Check window & source pixmap depth match last · 4495c696
    Michel Dänzer authored and Marge Bot's avatar Marge Bot committed
    Preparation for next commit, no functional change intended.
    
    Part-of: <!1300>
    4495c696
  • Michel Dänzer's avatar
    xwayland/present: Redirect surface window as needed for page flips · c7d56b0e
    Michel Dänzer authored and Marge Bot's avatar Marge Bot committed
    It's needed when the surface window is a depth 24 descendant of a depth
    32 toplevel window.
    
    xwl_source_validate ensures the toplevel window pixmap has valid
    contents when a client reads from it, or when the window hierarchy /
    geometry changes. It's never called in the normal fullscreen application
    case, so there's no GPU copy overhead with that.
    
    v2:
    * Don't try to redirect a depth 32 descendant of different-depth
      ancestors, the alpha channel wouldn't be handled correctly.
      (Olivier Fourdan)
    
    Part-of: <xorg/xserver!1300>
    c7d56b0e
Showing with 476 additions and 154 deletions
......@@ -53,7 +53,7 @@ xf86VTRequest(int sig)
}
Bool
xf86VTSwitchPending()
xf86VTSwitchPending(void)
{
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
......@@ -64,7 +64,7 @@ xf86VTSwitchPending()
}
Bool
xf86VTSwitchAway()
xf86VTSwitchAway(void)
{
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
......@@ -79,7 +79,7 @@ xf86VTSwitchAway()
}
Bool
xf86VTSwitchTo()
xf86VTSwitchTo(void)
{
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
......
......@@ -150,7 +150,7 @@ static xf86ConsOpen_t xf86ConsTab[] = {
};
void
xf86OpenConsole()
xf86OpenConsole(void)
{
int i, fd = -1;
xf86ConsOpen_t *driver;
......@@ -317,7 +317,7 @@ xf86OpenConsole()
#ifdef PCCONS_SUPPORT
static int
xf86OpenPccons()
xf86OpenPccons(void)
{
int fd = -1;
......@@ -342,7 +342,7 @@ xf86OpenPccons()
#ifdef SYSCONS_SUPPORT
static int
xf86OpenSyscons()
xf86OpenSyscons(void)
{
int fd = -1;
vtmode_t vtmode;
......@@ -448,7 +448,7 @@ xf86OpenSyscons()
#ifdef PCVT_SUPPORT
static int
xf86OpenPcvt()
xf86OpenPcvt(void)
{
/* This looks much like syscons, since pcvt is API compatible */
int fd = -1;
......@@ -560,7 +560,7 @@ xf86OpenPcvt()
#ifdef WSCONS_SUPPORT
static int
xf86OpenWScons()
xf86OpenWScons(void)
{
int fd = -1;
int mode = WSDISPLAYIO_MODE_MAPPED;
......@@ -591,7 +591,7 @@ xf86OpenWScons()
#endif /* WSCONS_SUPPORT */
void
xf86CloseConsole()
xf86CloseConsole(void)
{
#if defined(SYSCONS_SUPPORT) || defined(PCVT_SUPPORT)
struct vt_mode VT;
......@@ -668,7 +668,7 @@ xf86ProcessArgument(int argc, char *argv[], int i)
}
void
xf86UseMsg()
xf86UseMsg(void)
{
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
ErrorF("vtXX use the specified VT number (1-12)\n");
......
......@@ -735,7 +735,7 @@ xwl_window_dmabuf_feedback_done(void *data,
struct zwp_linux_dmabuf_feedback_v1 *dmabuf_feedback)
{
struct xwl_window *xwl_window = data;
uint32_t format = wl_drm_format_for_depth(xwl_window->window->drawable.depth);
uint32_t format = wl_drm_format_for_depth(xwl_window->surface_window->drawable.depth);
xwl_dmabuf_feedback_done(&xwl_window->feedback, dmabuf_feedback);
......@@ -743,7 +743,7 @@ xwl_window_dmabuf_feedback_done(void *data,
xwl_feedback_is_modifier_supported(&xwl_window->feedback, format,
DRM_FORMAT_MOD_INVALID, TRUE);
DebugF("XWAYLAND: Window 0x%x can%s get implicit scanout support\n",
xwl_window->window->drawable.id,
xwl_window->surface_window->drawable.id,
xwl_window->has_implicit_scanout_support ? "" : "not");
/* If the linux-dmabuf v4 per-surface feedback changed, make sure the
......
......@@ -412,7 +412,7 @@ PixmapPtr
xwl_glamor_create_pixmap_for_window(struct xwl_window *xwl_window)
{
struct xwl_screen *xwl_screen = xwl_window->xwl_screen;
WindowPtr window = xwl_window->window;
WindowPtr window = xwl_window->surface_window;
unsigned border_width = 2 * window->borderWidth;
if (!xwl_screen->glamor)
......@@ -972,13 +972,12 @@ struct xwl_dri3_syncobj
};
void
xwl_glamor_dri3_syncobj_passthrough(WindowPtr window,
xwl_glamor_dri3_syncobj_passthrough(struct xwl_window *xwl_window,
struct dri3_syncobj *acquire_syncobj,
struct dri3_syncobj *release_syncobj,
uint64_t acquire_point,
uint64_t release_point)
{
struct xwl_window *xwl_window = xwl_window_from_window(window);
struct xwl_screen *xwl_screen = xwl_window->xwl_screen;
struct xwl_dri3_syncobj *xwl_acquire_syncobj = (struct xwl_dri3_syncobj *)acquire_syncobj;
struct xwl_dri3_syncobj *xwl_release_syncobj = (struct xwl_dri3_syncobj *)release_syncobj;
......
......@@ -46,6 +46,7 @@
#include "xwayland-dmabuf.h"
#include "xwayland-glamor.h"
#include "xwayland-glamor-gbm.h"
#include "xwayland-present.h"
#include "xwayland-screen.h"
#include "xwayland-window.h"
#include "xwayland-window-buffers.h"
......@@ -96,8 +97,12 @@ xwl_glamor_check_flip(WindowPtr present_window, PixmapPtr pixmap)
ScreenPtr screen = pixmap->drawable.pScreen;
PixmapPtr backing_pixmap = screen->GetWindowPixmap(present_window);
if (pixmap->drawable.depth != backing_pixmap->drawable.depth)
return FALSE;
if (pixmap->drawable.depth != backing_pixmap->drawable.depth) {
if (pixmap->drawable.depth == 32)
return FALSE;
return xwl_present_maybe_redirect_window(present_window, pixmap);
}
return TRUE;
}
......
......@@ -67,7 +67,7 @@ Bool xwl_glamor_supports_syncobjs(struct xwl_screen *xwl_screen);
int xwl_glamor_get_fence(struct xwl_screen *screen);
void xwl_glamor_wait_fence(struct xwl_screen *xwl_screen, int fence);
struct dri3_syncobj *xwl_glamor_dri3_syncobj_create(struct xwl_screen *xwl_screen);
void xwl_glamor_dri3_syncobj_passthrough(WindowPtr window,
void xwl_glamor_dri3_syncobj_passthrough(struct xwl_window *xwl_window,
struct dri3_syncobj *acquire_syncobj,
struct dri3_syncobj *release_syncobj,
uint64_t acquire_point,
......
......@@ -543,11 +543,11 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer,
xwl_seat->pointer_enter_serial = serial;
xwl_seat->focus_window = wl_surface_get_user_data(surface);
dx = xwl_seat->focus_window->window->drawable.x;
dy = xwl_seat->focus_window->window->drawable.y;
dx = xwl_seat->focus_window->toplevel->drawable.x;
dy = xwl_seat->focus_window->toplevel->drawable.y;
/* We just entered a new xwindow, forget about the old last xwindow */
xwl_seat->last_xwindow = NullWindow;
xwl_seat->last_focus_window = NULL;
master = GetMaster(dev, POINTER_OR_FLOAT);
(*pScreen->SetCursorPosition) (dev, pScreen, dx + sx, dy + sy, TRUE);
......@@ -615,7 +615,7 @@ pointer_handle_leave(void *data, struct wl_pointer *pointer,
* in sprite_check_lost_focus()
*/
if (xwl_seat->focus_window) {
xwl_seat->last_xwindow = xwl_seat->focus_window->window;
xwl_seat->last_focus_window = xwl_seat->focus_window;
xwl_seat->focus_window = NULL;
focus_lost = TRUE;
}
......@@ -660,8 +660,8 @@ dispatch_absolute_motion(struct xwl_seat *xwl_seat)
int flags;
int event_x = wl_fixed_to_int(xwl_seat->pending_pointer_event.x);
int event_y = wl_fixed_to_int(xwl_seat->pending_pointer_event.y);
int drawable_x = xwl_seat->focus_window->window->drawable.x;
int drawable_y = xwl_seat->focus_window->window->drawable.y;
int drawable_x = xwl_seat->focus_window->toplevel->drawable.x;
int drawable_y = xwl_seat->focus_window->toplevel->drawable.y;
int x;
int y;
......@@ -1411,8 +1411,8 @@ xwl_touch_send_event(struct xwl_touch *xwl_touch,
double dx, dy, x, y;
ValuatorMask mask;
dx = xwl_touch->window->window->drawable.x;
dy = xwl_touch->window->window->drawable.y;
dx = xwl_touch->window->toplevel->drawable.x;
dy = xwl_touch->window->toplevel->drawable.y;
x = (dx + xwl_touch->x) * 0xFFFF / xwl_screen_get_width(xwl_seat->xwl_screen);
y = (dy + xwl_touch->y) * 0xFFFF / xwl_screen_get_height(xwl_seat->xwl_screen);
......@@ -2202,8 +2202,8 @@ tablet_tool_motion(void *data, struct zwp_tablet_tool_v2 *tool,
sx *= xwl_seat->tablet_focus_window->viewport_scale_x;
sy *= xwl_seat->tablet_focus_window->viewport_scale_y;
dx = xwl_seat->tablet_focus_window->window->drawable.x;
dy = xwl_seat->tablet_focus_window->window->drawable.y;
dx = xwl_seat->tablet_focus_window->toplevel->drawable.x;
dy = xwl_seat->tablet_focus_window->toplevel->drawable.y;
xwl_tablet_tool->x = (double) dx + sx;
xwl_tablet_tool->y = (double) dy + sy;
......@@ -3192,8 +3192,9 @@ sprite_check_lost_focus(SpritePtr sprite, WindowPtr window)
return TRUE;
if (xwl_seat->focus_window == NULL &&
xwl_seat->last_xwindow != NullWindow &&
(IsParent(xwl_seat->last_xwindow, window) || xwl_seat->last_xwindow == window))
xwl_seat->last_focus_window != NULL &&
(xwl_seat->last_focus_window->toplevel == window ||
IsParent(xwl_seat->last_focus_window->toplevel, window)))
return TRUE;
return FALSE;
......@@ -3227,13 +3228,13 @@ xwl_xy_to_window(ScreenPtr screen, SpritePtr sprite, int x, int y)
}
void
xwl_seat_clear_touch(struct xwl_seat *xwl_seat, WindowPtr window)
xwl_seat_clear_touch(struct xwl_seat *xwl_seat, struct xwl_window *xwl_window)
{
struct xwl_touch *xwl_touch, *next_xwl_touch;
xorg_list_for_each_entry_safe(xwl_touch, next_xwl_touch,
&xwl_seat->touches, link_touch) {
if (xwl_touch->window->window == window) {
if (xwl_touch->window == xwl_window) {
xorg_list_del(&xwl_touch->link_touch);
free(xwl_touch);
}
......@@ -3256,7 +3257,7 @@ xwl_pointer_warp_emulator_set_fake_pos(struct xwl_pointer_warp_emulator *warp_em
if (!warp_emulator->xwl_seat->focus_window)
return;
window = warp_emulator->xwl_seat->focus_window->window;
window = warp_emulator->xwl_seat->focus_window->toplevel;
if (x >= window->drawable.x ||
y >= window->drawable.y ||
x < (window->drawable.x + window->drawable.width) ||
......@@ -3325,7 +3326,7 @@ xwl_pointer_warp_emulator_maybe_lock(struct xwl_pointer_warp_emulator *warp_emul
if (pointer_grab &&
!pointer_grab->ownerEvents &&
sprite &&
XYToWindow(sprite, x, y) != xwl_seat->focus_window->window)
XYToWindow(sprite, x, y) != xwl_seat->focus_window->toplevel)
return;
xwl_pointer_warp_emulator_lock(warp_emulator);
......@@ -3363,7 +3364,7 @@ xwl_pointer_warp_emulator_handle_motion(struct xwl_pointer_warp_emulator *warp_e
QueuePointerEvents(xwl_seat->relative_pointer, MotionNotify, 0,
POINTER_RELATIVE, &mask);
window = xwl_seat->focus_window->window;
window = xwl_seat->focus_window->toplevel;
miPointerGetPosition(xwl_seat->pointer, &x, &y);
if (xwl_pointer_warp_emulator_is_locked(warp_emulator) &&
......
......@@ -81,7 +81,7 @@ struct xwl_seat {
OsTimerPtr x_cursor_timer;
CursorPtr pending_x_cursor;
struct xwl_cursor cursor;
WindowPtr last_xwindow;
struct xwl_window *last_focus_window;
uint32_t pointer_gesture_swipe_fingers;
uint32_t pointer_gesture_pinch_fingers;
......@@ -195,7 +195,7 @@ void xwl_seat_leave_kbd(struct xwl_seat *xwl_seat);
void xwl_seat_destroy(struct xwl_seat *xwl_seat);
void xwl_seat_clear_touch(struct xwl_seat *xwl_seat, WindowPtr window);
void xwl_seat_clear_touch(struct xwl_seat *xwl_seat, struct xwl_window *xwl_window);
void xwl_seat_emulate_pointer_warp(struct xwl_seat *xwl_seat,
struct xwl_window *xwl_window,
......
......@@ -25,6 +25,7 @@
#include <xwayland-config.h>
#include <compint.h>
#ifdef XWL_HAS_GLAMOR
#include <glamor.h>
#endif
......@@ -484,6 +485,7 @@ xwl_present_cleanup(WindowPtr window)
/* Clear timer */
xwl_present_free_timer(xwl_present_window);
TimerFree(xwl_present_window->unredirect_timer);
/* Remove from privates so we don't try to access it later */
dixSetPrivate(&window->devPrivates,
......@@ -771,21 +773,11 @@ xwl_present_check_flip(RRCrtcPtr crtc,
if (!RegionEqual(&present_window->clipList, &present_window->winSize))
return FALSE;
#ifdef XWL_HAS_GLAMOR
if (xwl_window->xwl_screen->glamor &&
!xwl_glamor_check_flip(present_window, pixmap))
return FALSE;
if (!xwl_glamor_supports_implicit_sync(xwl_window->xwl_screen) &&
!xwl_window->xwl_screen->explicit_sync)
return FALSE;
#endif /* XWL_HAS_GLAMOR */
/* Can't flip if the window pixmap doesn't match the xwl_window parent
* window's, e.g. because a client redirected this window or one of its
* parents.
*/
if (screen->GetWindowPixmap(xwl_window->window) != screen->GetWindowPixmap(present_window))
if (screen->GetWindowPixmap(xwl_window->surface_window) != screen->GetWindowPixmap(present_window))
return FALSE;
/*
......@@ -793,9 +785,19 @@ xwl_present_check_flip(RRCrtcPtr crtc,
* dimensions as their xwl_window parent window. For the case of
* different sizes subsurfaces are presumably the way forward.
*/
if (!RegionEqual(&xwl_window->window->winSize, &present_window->winSize))
if (!RegionEqual(&xwl_window->toplevel->winSize, &present_window->winSize))
return FALSE;
#ifdef XWL_HAS_GLAMOR
if (!xwl_glamor_supports_implicit_sync(xwl_window->xwl_screen) &&
!xwl_window->xwl_screen->explicit_sync)
return FALSE;
if (xwl_window->xwl_screen->glamor &&
!xwl_glamor_check_flip(present_window, pixmap))
return FALSE;
#endif /* XWL_HAS_GLAMOR */
return TRUE;
}
......@@ -882,7 +884,7 @@ xwl_present_flip(present_vblank_ptr vblank, RegionPtr damage)
#ifdef XWL_HAS_GLAMOR
if (vblank->acquire_syncobj && vblank->release_syncobj) {
if (xwl_window->xwl_screen->explicit_sync) {
xwl_glamor_dri3_syncobj_passthrough(present_window,
xwl_glamor_dri3_syncobj_passthrough(xwl_window,
vblank->acquire_syncobj,
vblank->release_syncobj,
vblank->acquire_point,
......@@ -1263,6 +1265,67 @@ xwl_present_unrealize_window(struct xwl_present_window *xwl_present_window)
xwl_present_reset_timer(xwl_present_window);
}
Bool
xwl_present_maybe_redirect_window(WindowPtr window, PixmapPtr pixmap)
{
struct xwl_present_window *xwl_present_window = xwl_present_window_get_priv(window);
struct xwl_window *xwl_window = xwl_window_from_window(window);
if (xwl_present_window->redirect_failed)
return FALSE;
if (compRedirectWindow(serverClient, window, CompositeRedirectManual) != Success) {
xwl_present_window->redirect_failed = TRUE;
return FALSE;
}
xwl_window_update_surface_window(xwl_window);
if (xwl_window->surface_window != window) {
compUnredirectWindow(serverClient, window, CompositeRedirectManual);
xwl_present_window->redirect_failed = TRUE;
return FALSE;
}
if (!xwl_window->surface_window_damage)
xwl_window->surface_window_damage = RegionCreate(NullBox, 1);
xwl_present_window->redirected = TRUE;
return TRUE;
}
static CARD32
unredirect_window(OsTimerPtr timer, CARD32 time, void *arg)
{
WindowPtr window = arg;
struct xwl_present_window *xwl_present_window = xwl_present_window_get_priv(window);
compUnredirectWindow(serverClient, window, CompositeRedirectManual);
xwl_present_window->redirected = FALSE;
xwl_present_window->unredirect_timer = NULL;
return 0;
}
Bool
xwl_present_maybe_unredirect_window(WindowPtr window)
{
struct xwl_present_window *xwl_present_window = xwl_present_window_get_priv(window);
if (!xwl_present_window || !xwl_present_window->redirected)
return FALSE;
/* This function may get called from composite layer code, in which case
* calling compUnredirectWindow would blow up. To avoid this, set up a timer
* which will call it "as soon as possible".
*/
if (!xwl_present_window->unredirect_timer) {
xwl_present_window->unredirect_timer =
TimerSet(NULL, 0, 1, unredirect_window, window);
}
return TRUE;
}
Bool
xwl_present_init(ScreenPtr screen)
{
......
......@@ -54,6 +54,10 @@ struct xwl_present_window {
present_vblank_ptr flip_active;
uint64_t blocking_event;
OsTimerPtr unredirect_timer;
Bool redirected;
Bool redirect_failed;
};
struct xwl_present_event {
......@@ -77,5 +81,7 @@ void xwl_present_frame_callback(struct xwl_present_window *xwl_present_window);
Bool xwl_present_init(ScreenPtr screen);
void xwl_present_cleanup(WindowPtr window);
void xwl_present_unrealize_window(struct xwl_present_window *xwl_present_window);
Bool xwl_present_maybe_redirect_window(WindowPtr window, PixmapPtr pixmap);
Bool xwl_present_maybe_unredirect_window(WindowPtr window);
#endif /* XWAYLAND_PRESENT_H */
......@@ -305,7 +305,7 @@ xwl_cursor_warped_to(DeviceIntPtr device,
xwl_window = xwl_window_from_window(window);
if (!xwl_window && xwl_seat->focus_window) {
focus = xwl_seat->focus_window->window;
focus = xwl_seat->focus_window->toplevel;
/* Warps on non wl_surface backed Windows are only allowed
* as long as the pointer stays within the focus window.
......@@ -339,15 +339,15 @@ find_matching_input_output_window(struct xwl_screen *xwl_screen,
/* When confining happens on InputOnly windows, work out the InputOutput
* window that would be covered by its geometry.
*/
if (window->drawable.x < xwl_window->window->drawable.x ||
if (window->drawable.x < xwl_window->toplevel->drawable.x ||
window->drawable.x + window->drawable.width >
xwl_window->window->drawable.x + xwl_window->window->drawable.width ||
window->drawable.y < xwl_window->window->drawable.y ||
xwl_window->toplevel->drawable.x + xwl_window->toplevel->drawable.width ||
window->drawable.y < xwl_window->toplevel->drawable.y ||
window->drawable.y + window->drawable.height >
xwl_window->window->drawable.y + xwl_window->window->drawable.height)
xwl_window->toplevel->drawable.y + xwl_window->toplevel->drawable.height)
continue;
if (xwl_window->window->drawable.class == InputOnly)
if (xwl_window->toplevel->drawable.class == InputOnly)
continue;
return xwl_window;
......@@ -1110,8 +1110,11 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
xwl_screen->ChangeWindowAttributes = pScreen->ChangeWindowAttributes;
pScreen->ChangeWindowAttributes = xwl_change_window_attributes;
xwl_screen->ResizeWindow = pScreen->ResizeWindow;
pScreen->ResizeWindow = xwl_resize_window;
xwl_screen->ClipNotify = pScreen->ClipNotify;
pScreen->ClipNotify = xwl_clip_notify;
xwl_screen->ConfigNotify = pScreen->ConfigNotify;
pScreen->ConfigNotify = xwl_config_notify;
xwl_screen->MoveWindow = pScreen->MoveWindow;
pScreen->MoveWindow = xwl_move_window;
......
......@@ -68,8 +68,10 @@ struct xwl_screen {
int nokeymap;
int hidpi;
ClipNotifyProcPtr ClipNotify;
CreateScreenResourcesProcPtr CreateScreenResources;
CloseScreenProcPtr CloseScreen;
ConfigNotifyProcPtr ConfigNotify;
CreateWindowProcPtr CreateWindow;
RealizeWindowProcPtr RealizeWindow;
UnrealizeWindowProcPtr UnrealizeWindow;
......@@ -78,8 +80,8 @@ struct xwl_screen {
SetWindowPixmapProcPtr SetWindowPixmap;
ChangeWindowAttributesProcPtr ChangeWindowAttributes;
ReparentWindowProcPtr ReparentWindow;
ResizeWindowProcPtr ResizeWindow;
MoveWindowProcPtr MoveWindow;
SourceValidateProcPtr SourceValidate;
int (*GrabServer) (ClientPtr client);
int (*UngrabServer) (ClientPtr client);
......@@ -90,6 +92,8 @@ struct xwl_screen {
struct xorg_list window_list;
Bool ignore_damage;
int need_source_validate;
int wayland_fd;
struct wl_display *display;
struct wl_registry *registry;
......
......@@ -339,7 +339,7 @@ xwl_window_allocate_pixmap(struct xwl_window *xwl_window)
return window_pixmap;
#endif /* XWL_HAS_GLAMOR */
window_pixmap = screen->GetWindowPixmap(xwl_window->window);
window_pixmap = screen->GetWindowPixmap(xwl_window->surface_window);
return screen->CreatePixmap(screen,
window_pixmap->drawable.width,
window_pixmap->drawable.height,
......@@ -358,7 +358,7 @@ xwl_window_realloc_pixmap(struct xwl_window *xwl_window)
if (!new_window_pixmap)
return;
window = xwl_window->window;
window = xwl_window->surface_window;
screen = window->drawable.pScreen;
window_pixmap = screen->GetWindowPixmap(window);
copy_pixmap_area(window_pixmap,
......@@ -366,7 +366,7 @@ xwl_window_realloc_pixmap(struct xwl_window *xwl_window)
0, 0,
window_pixmap->drawable.width,
window_pixmap->drawable.height);
xwl_window_set_pixmap(xwl_window->window, new_window_pixmap);
xwl_window_set_pixmap(xwl_window->surface_window, new_window_pixmap);
screen->DestroyPixmap(window_pixmap);
}
......@@ -393,7 +393,7 @@ xwl_window_buffers_set_syncpts(struct xwl_window_buffer *xwl_window_buffer)
else
goto fail;
xwl_glamor_dri3_syncobj_passthrough(xwl_window->window,
xwl_glamor_dri3_syncobj_passthrough(xwl_window,
xwl_window_buffer->syncobj,
xwl_window_buffer->syncobj,
acquire_point,
......@@ -414,11 +414,12 @@ PixmapPtr
xwl_window_swap_pixmap(struct xwl_window *xwl_window)
{
struct xwl_screen *xwl_screen = xwl_window->xwl_screen;
WindowPtr surface_window = xwl_window->surface_window;
struct xwl_window_buffer *xwl_window_buffer;
PixmapPtr window_pixmap;
Bool implicit_sync = TRUE;
window_pixmap = (*xwl_screen->screen->GetWindowPixmap) (xwl_window->window);
window_pixmap = (*xwl_screen->screen->GetWindowPixmap) (surface_window);
xwl_window_buffer_add_damage_region(xwl_window);
......@@ -441,8 +442,8 @@ xwl_window_swap_pixmap(struct xwl_window *xwl_window)
while (nBox--) {
copy_pixmap_area(window_pixmap,
xwl_window_buffer->pixmap,
pBox->x1 + xwl_window->window->borderWidth,
pBox->y1 + xwl_window->window->borderWidth,
pBox->x1 + surface_window->borderWidth,
pBox->y1 + surface_window->borderWidth,
pBox->x2 - pBox->x1,
pBox->y2 - pBox->y1);
......@@ -451,7 +452,7 @@ xwl_window_swap_pixmap(struct xwl_window *xwl_window)
RegionEmpty(xwl_window_buffer->damage_region);
xorg_list_del(&xwl_window_buffer->link_buffer);
xwl_window_set_pixmap(xwl_window->window, xwl_window_buffer->pixmap);
xwl_window_set_pixmap(surface_window, xwl_window_buffer->pixmap);
/* Can't re-use client pixmap as a window buffer */
if (xwl_is_client_pixmap(window_pixmap)) {
......
This diff is collapsed.
......@@ -62,7 +62,28 @@ struct xwl_window {
int surface_scale;
struct xdg_surface *xdg_surface;
struct xdg_toplevel *xdg_toplevel;
WindowPtr window;
/* Top-level window for the Wayland surface:
* - With rootful, the root window itself
* - With rootless, a direct child of the root window
* Mainly useful when the top-level window is needed, can also be used for
* the X dimensions of the Wayland surface though.
*/
WindowPtr toplevel;
/* The window associated with the Wayland surface:
* - If the top-level window has descendants which:
* - Cover it completely
* - Have no alpha channel
* - Use a different window pixmap than their parent for storage
* then the surface window is the lowest-level such descendant.
* - Otherwise it's the top-level window itself.
* Mainly useful for code dealing with (buffers for) the Wayland surface,
* can also be used for the X dimensions of the Wayland surface though.
*/
WindowPtr surface_window;
RegionPtr surface_window_damage;
struct xorg_list link_damage;
struct xorg_list link_window;
struct wl_callback *frame_callback;
......@@ -101,6 +122,7 @@ void xwl_window_rootful_update_title(struct xwl_window *xwl_window);
void xwl_window_rootful_update_fullscreen(struct xwl_window *xwl_window,
struct xwl_output *xwl_output);
void xwl_window_set_window_pixmap(WindowPtr window, PixmapPtr pixmap);
void xwl_window_update_surface_window(struct xwl_window *xwl_window);
void xwl_window_leave_output(struct xwl_window *xwl_window,
struct xwl_output *xwl_output);
......@@ -108,10 +130,11 @@ int xwl_window_get_max_output_scale(struct xwl_window *xwl_window);
Bool xwl_realize_window(WindowPtr window);
Bool xwl_unrealize_window(WindowPtr window);
Bool xwl_change_window_attributes(WindowPtr window, unsigned long mask);
void xwl_resize_window(WindowPtr window,
int x, int y,
unsigned int width, unsigned int height,
WindowPtr sib);
void xwl_clip_notify(WindowPtr window, int dx, int dy);
int xwl_config_notify(WindowPtr window,
int x, int y,
int width, int height, int bw,
WindowPtr sib);
void xwl_move_window(WindowPtr window,
int x, int y,
WindowPtr next_sib,
......