summaryrefslogtreecommitdiff
path: root/shared
AgeCommit message (Collapse)AuthorFilesLines
2013-05-14config-parser: Honor XDG_CONFIG_DIRSOssama Othman2-33/+69
This set of changes adds support for searching for a given config file in the directories listed in $XDG_CONFIG_DIRS if it wasn't found in $XDG_CONFIG_HOME or ~/.config. This allows packages to install custom config files in /etc/xdg/weston, for example, thus allowing them to avoid dealing with home directories. To avoid a TOCTOU race the config file is actually open()ed during the search. Its file descriptor is returned and stored in the compositor for later use when performing subsequent config file parses. Signed-off-by: Ossama Othman <ossama.othman@intel.com>
2013-04-03Fix compiler warningsArmin K1-0/+1
This prevents compiler warnings when using libpng 1.6 and GCC 4.8
2013-03-28sdk: be C++ friendlyGiulio Camuffo2-0/+16
This renames the weston_surface's private member to configure_private and externs "C" the headers of the SDK.
2013-02-20Pass argc pointer to parse_options()Kristian Høgsberg2-3/+4
This lets us keep argc up to date as the backend picks out arguments from the argv array.
2013-01-28matrix: track transform typeVasily Khoruzhick2-3/+30
Introduce several matrix transform types and track type for matrix. Could be usefull for activating some fastpath that depends on some transform type. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2013-01-28Add new shared/image-loader.h to separate include dependenciesKristian Høgsberg5-6/+35
Before, cairo-util.h would combine pixman and cairo includes. X11 and Wayland compositors uses this to load an image as a pixman_image_t but are forced to include cairo headers. Clients use load_cairo_surface to load images as cairo_surface_t's, but are forced to include pixman.h. We move the load_image pixman prototype to its own header, so compositors can get at the pixman prototype without including cairo.h and clients can include the cairo based function without including pixman.h.
2012-12-07Link matrix.c into weston againKristian Høgsberg2-3/+6
We want to make sure that the matrix symbols are exported from weston and that modules get them from there. To do that, we pull matrix.[ch] out of libshared and back into weston. calibrator now also links to matrix.[ch] and we add a IN_WESTON define to enable the WL_EXPORT macro when compiled inside weston.
2012-12-06Move matrix.[ch] to sharedRob Bradford3-1/+316
This means it can be used for the calibration tool.
2012-11-30Fix build warnings from image_loaderPekka Paalanen2-1/+2
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-29configure.ac: Don't link weston to cairo or image librariesKristian Høgsberg3-11/+26
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-10-10toytoolkit: Don't draw shadows for maximized windows.Scott Moreau2-23/+35
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-08-03config-parser: Handle lines that don't end in \nKristian Høgsberg1-3/+6
If the last line in a config file doesn't have a newline we end up chopping off the last character from that line.
2012-07-11image-loader: Use pixman_image_t, not struct pixman_image_tKristian Høgsberg1-1/+1
2012-07-11image-loader: don't leak pixman_image bits dataRafal Mielniczuk1-3/+21
Set the pixman_image destroy function to free bits data
2012-07-09shared: Don't leak file descriptor in shared/image-loader.cMartin Olsson1-1/+3
2012-07-09weston: Clip window title text to the frameMartin Minarik1-0/+5
Fixes an issue with text overflowing the available frame space.
2012-06-12compositor: add fallback strchrnul()Pekka Paalanen2-0/+15
Android does not have this function. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-06Rewrite shm buffer file allocation v2Pekka Paalanen2-0/+82
We had duplicated code in many places, using hardcoded paths for temporary files into more than one path. Some cases did not bother with O_CLOEXEC, and all hardcoded paths that might not exist. Add an OS helper function for creating a unique anonymous file with close-on-exec semantics. The helper uses $XDG_RUNTIME_DIR as the directory for a file. This patch unifies the buffer file creation in both Weston and the clients. As simple clients are better not linking to libshared, as it would require e.g. Cairo, they pull the OS compatibility code directly. Android does not have mkostemp(), so a configure test is added for it, and a fallback used if it is not available. Changes in v2: remove all the alternate possible directory definitions and use XDG_RUNTIME_DIR only, and fail is it is not set. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-05-31window: add wrapper for EPOLL_CLOEXECPekka Paalanen2-0/+20
Android does not have EPOLL_CLOEXEC, so add a fallback. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-05-31compositor: check for execinfo.hPekka Paalanen1-0/+10
Some systems may not have execinfo.h. Add a configure test for it, and if it is not found, make the backtrace() call a no-operation. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-05-31compositor: work around missing SOCK_CLOEXECPekka Paalanen3-0/+109
Android does not have SOCK_CLOEXEC, so implement a wrapper that falls back. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-05-22Share code to to classify pointer location in frameKristian Høgsberg2-0/+59
2012-05-15Rename libconfig-parser to libsharedKristian Høgsberg1-3/+4
Still a bad name.
2012-05-15Move cairo-util to shared/Kristian Høgsberg3-3/+502
2012-05-10Fix a few -pedantic warningsKristian Høgsberg2-2/+2
We're not enabling -pedantic by default, but a quick test brought up a few issues that we should fix.
2012-04-17config-parser: add missing return for an error casePekka Paalanen1-0/+2
Fixes config-parser.c: In function 'handle_key': config-parser.c:81: error: control reaches end of non-void function Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-04-11shared: Use $(GCC_CFLAGS), fix warningsKristian Høgsberg2-2/+6
2012-04-03Fix `unused-result' warnings.Jonas Ådahl1-2/+4
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-03-12Consolidate image loading code and move to shared/Kristian Høgsberg3-0/+388
2012-03-12Add an option parserKristian Høgsberg3-0/+101
On one hand, getopt (in particular the -o suboption syntax) sucks on the server side, and on the client side we would like to avoid the glib dependency. We can roll out own option parser and solve both problems and save a few lines of code total.
2012-01-27Implement CONFIG_KEY_UNSIGNED_INTEGERScott Moreau2-3/+14
strtol() does not work when trying to assign 32 bits of data into a regular signed int on 32 bit systems. Use corresponding strtoul() instead.
2011-12-08Use '-' to separate words in file namesKristian Høgsberg3-4/+5
Eventually we will want more functionality in the shared library and we will rename it at that point. Perhaps we'll name it libnih, but for now let's stick with libconfig-parser.
2011-12-08configparser: rename BOOL, document typesPekka Paalanen2-6/+6
Rename CONFIG_KEY_BOOL to CONFIG_KEY_BOOLEAN, just like CONFIG_KEY_INTEGER is not CONFIG_KEY_INT, for consistency. Document the types expected for the void* and name the enum in the header, so it is clear what config_key::type means. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-12-08move config parser to a convenience libraryPekka Paalanen3-0/+229
Create a new directory for convenience librariers that can be shared between compositor components and clients. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>