Commit Graph

76 Commits

Author SHA1 Message Date
Pekka Paalanen
c3ce738653 compositor: introduce weston_surface_geometry_dirty()
Instead of directly setting the dirty flag on weston_surface geometry,
use a function for that.

This allows us to hook into geometry dirtying in a following patch.

Also add comments to weston_surface fields, whose modification causes
transform state to become outdated.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-03-18 22:19:57 -04:00
Kristian Høgsberg
762b166c35 xwm: Only call set_fullscreen if the window is mapped
If we get a fullscreen client message before we map the window, we don't
have a shell surface yet.  Just dont call set_fullscreen yet, and rely on
xserver_map_shell_surface() to fullscreen it when we map it.
2013-02-21 20:18:37 -05:00
Kristian Høgsberg
cb4685bbd1 Pass argc and argv to modules
This lets modules parse options from the command line.
2013-02-20 15:37:49 -05:00
Kristian Høgsberg
a1377cf198 Add missing builddir includes for version.h
af4f2aaf19 broke this
2013-02-20 14:47:43 -05:00
Kristian Høgsberg
af4f2aaf19 Install header files and pkg-config file for external modules
This patch installs the three header files that define the compositor
plugin interface as well as a pkg-config file.  This allows
building weston plugins outside the weston tree.  We currently don't make
any guarantees about the plugin API/ABI except that within a stable
branch we won't break it.
2013-02-18 15:29:35 -05:00
Kristian Høgsberg
81585e9d2a xwm: Don't leak pending.input region
It's not really a leak, since the region is always a rectangle, but let's
play by the rules.
2013-02-14 22:03:02 -05:00
Kristian Høgsberg
25bb696fc8 xwm: Fix silly region math
We were setting up the opaque region to be the window size and then
intersecting with the opaque rectange that's always contained in the window
rectangle.  Just initialize to the opaque rectangle.
2013-02-14 22:03:02 -05:00
Kristian Høgsberg
d8b617deea xwm: Fix input region regression from commit changes
This must be the last regression from the surface commit changes.  We
need to set the pending.input region, otherwise the region will be
overwritten on commit.

https://bugs.freedesktop.org/show_bug.cgi?id=60610
2013-02-14 21:56:48 -05:00
Kristian Høgsberg
b810eb5750 xwm: Support _NET_WM_STATE_FULLSCREEN
We can now handle fullscreen X windows.  X clients request to go fullscreen
buy sending a _NET_WM_STATE client message to the root window.  When that
happens we call into the shell interface and asks the shell to make the
surface fullscreen.  The shell will then resize the window, which causes
the X wm to configure the X window appropriately.

Make sure we ignore configure requests from fullscreened clients and send out
the synthetic configure notify as required in that case.

Finally, inspect _NET_WM_STATE before mapping so we can handle initial
fullscreen correctly.
2013-02-12 21:55:51 -05:00
Rob Bradford
aa521bd1bc xwayland/window-manager: Avoid doing work for unknown window
In particular if the hash table lookup fails and returns NULL then that value
would be passed into weston_wm_window_schedule_repaint which does not accept a
NULL value.
2013-01-10 16:08:08 -05:00
Rob Bradford
ef94085ff1 xwayland: Close fd opened for lockfile on error path 2012-12-06 22:32:25 -05:00
Tiago Vignatti
2d129f11fe xwayland: Staticize weston_wm_set_selection and read_and_dump_property
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-11-30 18:00:09 -05:00
Tiago Vignatti
3df3f225e3 xwayland: Remove useless structure
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-11-30 18:00:09 -05:00
Tiago Vignatti
9c4ff831c6 xwm: Rename get_resources function
It's pure WM-related function, so use the same 'weston_wm_' prefix that others
in the same file are already using.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-11-30 18:00:09 -05:00
Tiago Vignatti
f268446339 xwayland: Standardize 'wxs' for weston_xserver variables
It was already being used in most of launcher.c and window-manager.c, so let's
make a standard everywhere now.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-11-30 18:00:09 -05:00
Pekka Paalanen
4fbb65372e Fix build warnings from image_loader
Fix the following build warnings, and the build failures due to the
warning fixes:

  CC     libshared_cairo_la-image-loader.lo
image-loader.c:369:1: warning: no previous prototype for 'load_image'

  CC     x11_backend_la-compositor-x11.lo
compositor-x11.c: In function 'x11_output_set_icon':
compositor-x11.c:396:2: warning: implicit declaration of function 'load_image'
compositor-x11.c:396:8: warning: assignment makes pointer from integer without a cast

  CC     wayland_backend_la-compositor-wayland.lo
compositor-wayland.c: In function 'create_border':
compositor-wayland.c:97:2: warning: implicit declaration of function 'load_image'
compositor-wayland.c:97:8: warning: assignment makes pointer from integer without a cast

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-11-30 14:24:00 -05:00
Kristian Høgsberg
6006ecb497 configure.ac: Don't link weston to cairo or image libraries
We were pulling in cairo and the image loading libraries through libshared.
Split out libshared into a core libshared and a libshared-cairo that
pulls in the extra libraries.
2012-11-29 13:32:11 -05:00
Scott Moreau
76d8fc8216 xwm: Fix xwm opaque region
Since surface.commit was introduced, opqaue regions are stored in a pending
variable that isn't used until surface.commit. Xwayland uses the surface opaque
region as a way to tell weston what region of the surface should be opaque.
However when this pending opaque region was introduced, xwm was not updated
and so we have the 'black = transparent' problem again. This patch fixes the
problem by having xwm use the pending opaque regions.
2012-11-27 17:23:42 -05:00
Tiago Vignatti
ac78bb1017 xwm: Fail safely if cursor is not found
It will use the stock 'x' cursor instead when the system cursors are not
provided.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-10-29 13:44:33 -04:00
Scott Moreau
c6a7e4b277 toytoolkit: Don't draw shadows for maximized windows.
Add THEME_FRAME_MAXIMIZED flag so the theming system can know not to draw
shadows for maximized windows. This allows maximized surfaces' content to be
sized and placed in a more expectable fashion.
2012-10-10 11:23:41 -04:00
Tiago Vignatti
0d20d7c8f4 xwm: Plug kill signal for killing X apps
Xeyes is the counter-example that fails on that heuristic and won't be caught
on kill binding. This and the last two patches should fix:

    https://bugs.freedesktop.org/show_bug.cgi?id=53679

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-10-04 11:07:50 -04:00
Kristian Høgsberg
b00a9d3cb9 compositor: Make all non-backend modules use module_init() as entry point 2012-09-11 14:06:27 -04:00
Pekka Paalanen
4f9c07bf11 xwayland: replace opaque_rect, fix an alpha problem
Remove weston_surface::opaque_rect completely.

Instead, set the opaque region in xwayland.

Before this patch, black text in xterm was transparent. Now it is not.

However, this patch fixes only a part of the alpha problem. If you apply
full-surface alpha with super+alt+wheel, the problem reappears. This
problem is still due to bad alpha channel contents on xwayland windows.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-09-04 16:14:29 -04:00
Kristian Høgsberg
5ba31891a1 xwm: Use a simple heuristic for mapping X input events to a weston seat 2012-08-10 10:06:59 -04:00
Kristian Høgsberg
64eca8949b compositor: Fold the log prototypes into compositor.h and drop log.h
We're trying to keep the API exposed by the core compositor in compositor.h
2012-08-01 00:00:57 -04:00
Kristian Høgsberg
c4063f310a xwm: Make override-redirect windows opaque 2012-07-22 15:32:45 -04:00
Tiago Vignatti
ce1baa8097 xwm: use last focused window for guessing transient parent
On X the global absolute coordinates are sent in ConfigureNotify and transient
windows are mapped exactly on that position. On Wayland we don't have the
concept of global coordinates, and that's a problem for transient surfaces
without transient_for set because they rely on such hint for setting their
positioning.

So this solution is a workaround. It guesses a parent based on the last
focused window to determine the relative position of the transient surface.
This put transient windows of Chrome browser back to work.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-07-22 14:35:25 -04:00
Tiago Vignatti
e66fcee435 xwm: Fix transient positioning
Commit eaee7841 took out the configure positioning of windows. This patch
brings it back and addresses also logic for resizing and sub-menus, that was
not covered on that commit.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-07-22 14:28:35 -04:00
Tiago Vignatti
2ea74d9f71 xwm: Initialize window decoration always as !override
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-07-22 14:26:49 -04:00
Tiago Vignatti
9134b77f2c xwm: Don't try to change frame cursor when there's no decoration
It was causing some artifacts on chrome.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-07-20 15:31:00 -04:00
Tiago Vignatti
c190323c90 xwm: set the root window pointer to left_ptr
More pretty and also consistent with toytoolkit.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-07-16 13:35:27 -04:00
Tiago Vignatti
236b48d414 xwm: set appropriate cursors for the frame window
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-07-16 13:35:27 -04:00
Tiago Vignatti
90fada4338 xwayland: add simple xcb-cursor hook based on libXcursor
It's in fact based on the core of libXcursor, which doesn't bring any Xlib
dependency.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-07-16 13:35:27 -04:00
Kristian Høgsberg
e89cef37eb xwayland: Look up 32 depth rgba render format as well 2012-07-16 13:35:27 -04:00
Kristian Høgsberg
e6d8d2f62a xwayland: Use the right length for iterating through the formats array
Spotted by Tiago Vignatti, minimal fix to just use the right length.
2012-07-16 13:35:26 -04:00
Martin Olsson
197214112c xwayland: Don't leak fd while reading lock file in src/xwayland/launcher.c 2012-07-09 17:50:45 -04:00
Kristian Høgsberg
8150b190d6 shell: Take a wl_surface as parent for transient and popup windows 2012-06-27 10:24:22 -04:00
Kristian Høgsberg
529b00eb34 xwm: Add xwayland.h to Makefile.am 2012-06-25 16:00:48 -04:00
Kristian Høgsberg
cd80f107b3 xwm: Fix crash when we don't have a transient_for window 2012-06-15 15:40:57 -04:00
Tiago Vignatti
bf1e8660ed xwm: fix typo on windows hints
was giving a wrong assignment to window->type.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-06-13 09:23:16 -04:00
Martin Minarik
6d11836721 Replace fprintf() by weston_log() 2012-06-08 13:11:36 -04:00
Tiago Vignatti
771241e88f xwm: use override_redirect for determining or not top-level windows
"top-level window is a window whose override-redirect attribute is False",
ICCCM 4.1.1

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-06-05 11:49:18 -04:00
Tiago Vignatti
71574542b3 xwayland: fix typo on configure libs
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-06-05 11:46:51 -04:00
Kristian Høgsberg
be375b362b xwm: Only destroy window frame in unmap_notify if we have one
Based on a patch from Tiago Vignatti <tiago.vignatti@intel.com>.
2012-06-05 11:46:08 -04:00
Kristian Høgsberg
670b5d343d xwm: Take WM_S0 manager selection 2012-06-04 11:00:40 -04:00
Kristian Høgsberg
cba022af3d xwm: Claim the CLIPBOARD_MANAGER selection 2012-06-04 10:11:45 -04:00
Kristian Høgsberg
e220327223 xwm: Initialize X selection on X server startup
This way an already existing wayland selection will be available on
launch.
2012-06-03 17:59:04 -04:00
Kristian Høgsberg
4dec011807 xwm: Move selection proxy setup to selection.c 2012-06-03 17:59:04 -04:00
Kristian Høgsberg
c65d56a280 xwm: Follow wl_data_source changes
Creating the wl_data_offer is now entirely inside libwayland-server.
2012-06-03 17:58:45 -04:00
Kristian Høgsberg
805667388b xwayland: Handle selection source going away without crashing 2012-06-01 00:08:12 -04:00