summaryrefslogtreecommitdiff
path: root/hw/kdrive
AgeCommit message (Collapse)AuthorFilesLines
2014-04-03Revert "glx: Make sure we get an FBConfig the root window's visual."Eric Anholt1-1/+0
This reverts commit b5a61239e2fef167c229154d7919ff862503e3f3. Not only did I screw up and introduce a warning, it turns out glXChooseFBConfig() explicitly ignores this attribute. Thanks, GLX. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Julien Cristau <jcristau@debian.org>
2014-03-27Fix ephyr build with --disable-glamorJon TURNEY1-1/+4
See http://tinderbox.x.org/builds/2014-03-23-0010/logs/xserver/#build Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Tested-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Julien Cristau <jcristau@debian.org>
2014-03-27Build fbcmap_mi.c once, rather than once for each DDXJon TURNEY1-4/+1
Build fbcmap_mi.c once, rather than once for each DDX, and make it part of libfb or libwfb convenience library. Since 84e8de1271bb11b5b4b9747ae4647f47333a8ab7 we don't have fbcmap.c This is a sort of revert of 17d85387d1e6851d35474b65929e268ca64ef65b v2: Remove libkdrivestubs.la from configure.ac Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2014-03-26Xephyr: restore initial window resize lost in xcb conversionJulien Cristau1-0/+6
The XResizeWindow call wasn't replaced by the xcb equivalent, so we were no longer setting the initial window size, only wm size hints. Regression from commit a2b73da "Xephyr: start converting hostx.c over to xcb" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74849 Signed-off-by: Julien Cristau <jcristau@debian.org> Reported-by: Laércio de Sousa <lbsousajr@gmail.com> Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-03-26glamor: Get testing code using small FBOs working againKeith Packard1-1/+3
Glamor has a mode where pixmaps will be constructed from numerous small FBOs. This allows testing of the tiled pixmap code without needing to create huge pixmaps. However, the render glyph code assumed that it could create a pixmap large enough for the glyph atlas. Instead of attempting to fix that (which would be disruptive and not helpful), I've added a new pixmap creation usage, GLAMOR_CREATE_NO_LARGE which forces allocation of a single large FBO. Now that we have pixmaps with varying FBO sizes, I then went around and fixed the few places using the global FBO max size and replaced that with the per-pixmap FBO tiling sizes, which were already present in each large pixmap. Xephyr has been changed to pass GLAMOR_CREATE_NO_LARGE when it creates the screen pixmap as it doesn't want to deal with tiling either. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-03-26kdrive: Remove duplicated definitions of some XV-related structs.Eric Anholt2-59/+4
v2: Fix crash because of removed strdup. (by Markus Wick) Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net> (v2)
2014-03-26ephyr: typo where "()" should be "$()" in the Makefile - breaks make distGaetan Nadon1-1/+1
make[3]: Entering directory `/home/nadon/xorg/src/xserver/hw/kdrive/ephyr' make[3]: *** No rule to make target `()', needed by `distdir'. Stop. make[3]: Leaving directory `/home/nadon/xorg/src/xserver/hw/kdrive/ephyr' make[2]: *** [distdir] Error 1 Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-03-25miinitext: introduce LoadExtensionList() to replace over LoadExtension()Emil Velikov1-4/+1
Looping around LoadExtension() meant that ExtensionModuleList was reallocated on every extension. Using LoadExtensionList() we pass an array thus the function can do the reallocation in one go, and then loop and setup the ExtensionModuleList. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com> v2: Update ephyr [Keith Packard] v3: Eliminate const warnings in LoadExtensionList [Keith Packard] Signed-off-by: Keith Packard <keithp@keithp.com>
2014-03-17glx: Make sure we get an FBConfig the root window's visual.Eric Anholt1-0/+1
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-03-17glamor: Do glyph private init at screeninit time, and other stuff at CSR.Eric Anholt1-3/+0
This hasn't actually been a problem, since the server hasn't allocated any glyphs before our glyph private initialization during CreateScreenResources. But it's generally not X Server style to do things this way. Now that glamor itself drives both parts of glyphs setup, DDX drivers no longer need to tell glamor to initialize glyphs. We do retain the old public symbol so they can keep running with no changes. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Markus Wick <markus@selfnet.de>
2014-03-17xephyr: Don't forget to glViewport() before drawing the screen.Eric Anholt3-0/+29
Fixes misrendering with cairogears. I had noticed the failure while trying to figure out what was going on with traps. Cairogears was apparently putting its results on the screen through putimage, which is a texture upload, so the last GL drawing was done to the size of the cairogears window, not the size of the xephyr screen. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-03-07Fix xephyr build in --disable-glamor caseJon TURNEY1-3/+8
It broke after commit 9fe052d90cca90fdf750d3a45b151be2ac7f0ebd "xephyr: Build support for rendering with glamor using a -glamor option." See http://tinderbox.x.org/builds/2014-03-07-0004/logs/xserver/#build Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-03-05xephyr: Pass incoming XCB events to the Xlib event filter.Eric Anholt3-2/+55
This is the same thing that Qt ended up doing to get DRI2's event mangling to happen despite using an XCB event loop. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-03-05xephyr: Build support for rendering with glamor using a -glamor option.Eric Anholt7-16/+554
v2: Avoid making the Ximage for the screen that we'll never use, and drive the screen pixmap creation for glamor ourselves. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com> (v1) Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-02-07ephyr: Repaint entire screen when colormap is updatedKeith Packard1-0/+15
Any time the colormap is changed, the entire screen needs to be repainted to match. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-22kdrive/ephyr: Remove extra 'i' variable in ProcXF86DRIGetDrawableInfoKeith Packard1-1/+0
Just re-use the top-level one Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-22kdrive: Fix -Wshadow errorsKeith Packard2-4/+4
Just rename stuff to avoid conflicts. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-22Merge remote-tracking branch 'whot/for-keith'Keith Packard1-1/+26
2014-01-12Replace 'pointer' type with 'void *'Keith Packard9-51/+51
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer' is used throughout the X server for other things, and having duplicate names generates compiler warnings. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-12kdrive/ephyr; Don't redeclare monitorResolutionKeith Packard1-2/+0
It's already declared in globals.h Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12kdrive/ephyr: ddxUseMsg is supposed to returnKeith Packard1-2/+0
I'm not sure why ephyr thinks that ddxUseMsg shouldn't return, but it's not declared to exit. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-09ephyr: don't allow a shift+ctrl keygrab if mod1 was enabledPeter Hutterer1-1/+26
Xephyr wants ctrl+shift to grab the window, but that conflicts with ctrl+alt+shift key combos. Remember the modifier state on key presses and releases, if mod1 is pressed, we need ctrl, shift and mod1 released before we allow a shift-ctrl grab activation. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-12-10ephyr: Fix compilation when ./configure'd with --enable-debugJon TURNEY1-4/+4
/jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c: In function ‘ephyrProcessMouseMotion’: /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c:946:188: error: ‘ephyrCurScreen’ undeclared (first use in this function) /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c: In function ‘ephyrProcessButtonPress’: /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c:980:186: error: ‘ephyrCurScreen’ undeclared (first use in this function) /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c: In function ‘ephyrProcessButtonRelease’: /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c:1007:186: error: ‘ephyrCurScreen’ undeclared (first use in this function) Fix ephyr compilation when ./configure'd with --enable-debug after commit 46cf6bf5692ef751ec9d17ae2292565d4b13f14b, some instances of ephyrCurScreen were not converted to screen->pScreen->myNum. v2: Don't use a trivial local variable which will be unused when ./configure'd with --disable-debug Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-14kdrive: fix cursor jumps on CursorOffScreen behaviorPeter Hutterer1-4/+4
This patch fixes cursor jumps when there is a grab on the Xephyr window and the pointer moves outside the window. So on two side-by-side 640x480 screens, a coordinate of 0/481 triggers KdCursorOffscreen. If the delta between two screens is 0, they share the same offset for that dimension. When searching for the new screen, the loop always rules out the current screen. So we get to the second screen, trigger the conditions where dy <= 0 and decide that this new screen is the correct one. The result is that whenever KdCursorOffScreen is called, the pointer jumps to the other screen. Change to check for dy < 0 etc. so that the cursor stays on the same screen if there is no other screen at the target location. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-11-14kdrive: modify ephyr events to use POINTER_DESKTOP and scale them to thatPeter Hutterer3-1/+11
A multi-head Xephyr instance has the pointer stuck on one screen because of bad coordinate calculation. The coordinates passed to GetPointerEvents are per-screen, so the cursor gets stuck on the left-most screen by default. Adjust and mark the events as POINTER_DESKTOP, so the DIX can adjust them accordingly. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-11-14kdrive: handle WxH as valid geometry specKeith Packard1-1/+2
If a screen size was specified as WxH, the loop returned early and kdOrigin was never advanced. Thus, screen->origin was always 0 (or whatever was given at the -origin commandline flag). If a screen size was given with a bit depth (WxHxD), kdOrigin would always advance by the current screen, offsetting the next screen. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-14ephyr: xcb_connect returns an error, not NULLPeter Hutterer1-2/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2013-10-31ephyr: Ensure stride of private framebuffer is multiple of 4Søren Sandmann Pedersen1-7/+8
The fb layer of X can't deal with strides that are not a multiple of 4, so when Xephyr allocates its own framebuffer it should make sure to align it. This fixes crashes and rendering corruption when Xephyr runs in a depth that is different from the host X server and its screen size is not a multiple of 4 / depth. (This is particularly easy to trigger if you use the -resizeable option). Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Soren Sandmann <ssp@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31ephyr: hostx_screen_init(): Fix bits_per_pixel and bytes_per_lineSøren Sandmann Pedersen1-3/+6
When the depth of the Xephyr server matches that of the host X server, Xephyr simply uses the buffer associated with the XImage as its framebuffer. In this case, it is correct to get the bits_per_pixel and bytes_per_line values returned from hostx_screen_init() from the XImage. However, when the depth doesn't match the host, Xephyr uses a private framebuffer that is periodically copied to the XImage. In this case, the returned values of bits_per_pixel and bytes_per_line should be those of the private framebuffer, not those of the XImage. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Soren Sandmann <ssp@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-30kdrive/ephyr: Don't discard one-time driver structure at server resetKeith Packard1-2/+0
KdScreenInfo is constructed at server startup time, and not re-generated at server reset time. Freeing the 'driver' element at reset time means this information is lost, and the server crashes pretty quickly afterwards. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-21unbreak KdEnableInputStrake1-5/+6
pi = ki = 0 here, so not follow them. Signed-off-by: Strake <strake888@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-10-14Xephyr: restore cursor visibilityMichele Baldessari1-0/+2
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=69388 Commit c100211034ab69ce453a1644fb61c6808d7e3eda (dix: only show the cursor if a window defines one (#58398)) broke the default cursor behaviour in Xephyr (unless run with -retro). Restore the default cursor visibility so that '-retro' or '-host-cursor' are not needed to have a visible cursor. Signed-off-by: Michele Baldessari <michele@acksyn.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> as of ba387cf21f7d95987211f75d8024601e7d64e322 "ephyr: Use host (HW) cursors by default." this only applies if -sw-cursor is given on the cmdline. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-10-14Fix Xephyr compilation when DEBUG is enabledMichele Baldessari1-1/+1
When DEBUG is enabled Xephyr compilation fails: ephyrdriext.c:343:133: error: 'is_ok' undeclared (first use in this function) EPHYR_LOG("leave. is_ok:%d\n", is_ok); Just reemove bogus is_ok variable. Signed-off-by: Michele Baldessari <michele@acksyn.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-10-04kdrive/ephyr: Remove duplicate ephyrExtensions and ephyrExtensionInit declsKeith Packard1-16/+0
These were duplicated when GLX support was re-added on two different branches. Signed-off-by: Keith Packard <keithp@keithp.com>
2013-10-04Merge remote-tracking branch 'anholt/ephyr-fixes'Keith Packard20-4159/+1682
2013-09-10damage: Implicitly unregister on destroyAdam Jackson1-3/+0
There's no reason not to, and it simplifies quite a few callers. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10mipointer: Remove EnqueueEvent from miPointerScreenFuncRecAdam Jackson1-1/+0
No DDX overrode this, and we never actually called through that slot anyway. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10mipointer: Flatten calls to mieqSwitchScreenAdam Jackson1-1/+0
No DDX was overriding this. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-09-10ephyr: restore GLX supportLaurent Carlier1-0/+20
It was removed since version 1.13 Signed-off-by: Sebastien Bacher <seb128@ubuntu.com> Acked-by: Daniel Stone <daniel@fooishbar.org>
2013-09-06kdrive: fix build error on gcc 4.8 for out-of-bounds array accessChris Clayton1-1/+1
I'm getting a error building xorg-server-1.14.1.902 with thelatest snapshot of gcc-4.8: input.c:225:43: error: array subscript is above array bounds [-Werror=array-bounds] This is because kdNumInputFds can become equal to KD_MAX_INPUT_FDS in KdRegisterFd(). This means that in KdUnregisterFd(), kdInputFds[j + 1] can be beyond the end of the array. Signed-off-by: Chris Clayton <chris2553@googlemail.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-03kdrive: initialize GLX for xephyrSebastien Bacher1-0/+20
Like commit ac1a60e7b6f06fd075cc5bf55d6bc67206a01d29, re-add initialization of GLX after it was accidentally dropped from non-Xorg servers in 5f5bbbe543f65c48ecbb5cce80116a86ca3fbe86. Signed-off-by: Sebastien Bacher <seb128@ubuntu.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62346 Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Eric Anholt <eric@anholt.net>
2013-09-03ephyr: Do grab/ungrab for ctrl+shift, not just shift+ctrl.Eric Anholt1-3/+6
Given that the window title says "ctrl+shift", having pressing those keys in that order not ungrab you is fairly mean. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03ephyr: Flush the X connection when updating the window title.Eric Anholt1-0/+1
Otherwise when you're doing the ctrl-shift mouse grab thing, you don't know what state you're in until the next rendering occurs. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03ephyr: Use host (HW) cursors by default.Eric Anholt3-7/+11
Unless you're working on the sw cursor rendering code, you surely want to have real hardware cursors. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03ephyr: Garbage collect some DOA host window clipping code.Eric Anholt2-43/+0
Introduced in 79782726617d4b5a4f9b376f21936d035fc870e1 but never used. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03ephyr: Garbage collect some dead XV clipping code.Eric Anholt1-113/+4
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03ephyr: Remove the helper libs for each of the optional components.Eric Anholt1-49/+38
Note that EXTRA_DIST was always unnecessary, because automake notices conditional compile of source files and includes them. Copyright header is added because git noted that this was a 61% rewrite. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03ephyr: Remove the remaining bits of host/server XV split.Eric Anholt4-202/+33
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03ephyr: Remove the host/server split of the actual XV video operations.Eric Anholt3-270/+137
I suspect there's more cleanup possible in ephyrHostXVPutImage() by sticking a bunch of the args in the port priv earlier. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Julien Cristau <jcristau@debian.org>
2013-09-03ephyr: Remove another host/server split for XV image formats.Eric Anholt3-99/+56
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Julien Cristau <jcristau@debian.org>