Peter Hutterer
f3d62276d2
malloc + memset -> zalloc
...
And for clients using the xmalloc helper, use xzalloc.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
12 years ago
Jan Arne Petersen
d160a309e6
view: g_type_init() is deprecated in glib >= 2.35
...
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
12 years ago
Kristian Høgsberg
4172f668e7
Pass argc pointer to parse_options()
...
This lets us keep argc up to date as the backend picks out arguments
from the argv array.
12 years ago
Pekka Vuorela
64988feb13
PDF viewer to run until and only when it has existing windows
...
I.e. not to close whole application when one of the windows
is closed.
12 years ago
Pekka Vuorela
2dbe4c632e
Fix memory leak in PDF viewer
12 years ago
Pekka Vuorela
2bd429b734
Fix PDF viewer not to produce garbage windows for nonexistent files
...
Was calling window_flush() on redraw handler which already happens on
window redrawing.
12 years ago
Kristian Høgsberg
67ace20f8e
window.c: Add fullscreen handler to keep fullscreen state consistent
13 years ago
Daniel Stone
c9785eacca
Use enum wl_keyboard_key_state instead of integer
...
Instead of using a uint32_t for state everywhere (except on the wire,
where that's still the call signature), use the new
wl_keyboard_key_state enum, and explicit comparisons.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
13 years ago
Daniel Stone
4dbadb1556
Use enum wl_pointer_button_state instead of integer
...
Instead of using a uint32_t for state everywhere (except on the wire,
where that's still the call signature), use the new
wl_pointer_button_state enum, and explicit comparisons.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
13 years ago
Daniel Stone
5d66371743
Change button from int to uint32_t
...
Since you can't really have a negative button number.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
13 years ago
Daniel Stone
da5b93c8d7
Change key/button grab bindings to take unsigned state
...
'state' here meaning 'is it up or down?', obviously.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
13 years ago
Kristian Høgsberg
f02a649a3c
Consolidate image loading code and move to shared/
13 years ago
Kristian Høgsberg
bcacef19b0
Add an option parser
...
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.
13 years ago
Kristian Høgsberg
010f98b083
window: Track and report input and opaque regions
...
We just set the input region to the bounding box of the window frame
and set the opaque region to be the opaque rectangle inside the window
if the child widget is opaque.
13 years ago
Kristian Høgsberg
66c0880c58
view: Don't schedule resize after setting fullscreen
...
window_set_fullscreen will schedule a resize or wait for the configure
event as needed.
13 years ago
Kristian Høgsberg
009ac0a965
window: Dont take width and height in window constructor
...
Always set this by scheduling an initial resize.
13 years ago
Kristian Høgsberg
ab5dacdac8
view: Make view compile again
13 years ago
Kristian Høgsberg
29af3ebce6
window: Make decorations just a widget
...
Woohoo, only took 25 commits of refactoring to get to this point.
13 years ago
Kristian Høgsberg
bb97700474
window: Get rid of the window child allocation concept
13 years ago
Kristian Høgsberg
b67e94b170
window: Make resize and redraw handlers widget vfuncs
13 years ago
Kristian Høgsberg
a8a0db3497
window: Move button handler to widget
13 years ago
Kristian Høgsberg
c5241f5b73
Never include wayland-util.h directly
...
And fix a missing "" to <> conversion for wayland-client.h include.
13 years ago
Pekka Paalanen
50719bce2a
Fix inconsistent #include style
...
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
13 years ago
Eugeni Dodonov
397b908d7b
Add missing include for gio.h.
...
This is needed by GFile, used by view.c.
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
13 years ago
Kristian Høgsberg
41abb2865e
view: Fix reference to wayland-glib.h
13 years ago
Benjamin Franzke
4b87a13974
clients: Fix typos
...
And forgotten display_create conversion in view.c.
13 years ago
Kristian Høgsberg
b3bef626ce
view: Set opaque when going fullscreen
14 years ago
Kristian Høgsberg
393d47aa6f
view: Add fullscreen option
14 years ago
Kristian Høgsberg
12283cc9a2
view: Set resize handler so fullscreen doesn't crash
14 years ago
Tim Wiederhake
b4b67344f0
Define global handler on display creation
...
Otherwise the initial announcement of interfaces gets lost.
14 years ago
Tim Wiederhake
80bf6f78e4
clients/view: Fix memory leak
14 years ago
Tim Wiederhake
6685aceae3
clients/view: Don't try to show inexistant files
14 years ago
Tim Wiederhake
9aad08e91b
clients/view: Allow relative paths
14 years ago
Tim Wiederhake
655467a5d2
clients/view: Add mousewheel and arrow keys
14 years ago
Tim Wiederhake
7e182ef13b
clients/view: Remove unnecessary variables
14 years ago
Tim Wiederhake
1afc9a98fa
clients/view: Do not browse outside document range
14 years ago
Kristian Høgsberg
00439617f3
Fix new gcc 4.6 warnings
...
simple-client.c:156:10: warning: variable ‘ar’ set but not used [-Wunused-but-set-variable]
etc.
14 years ago
Kristian Høgsberg
248c1b61ce
Add an orange pop-up menu to test the new map_transient request
14 years ago
Kristian Høgsberg
67cac8a565
Pass input device and time in key_handler callback
...
Move the modifiers to a input device getter function.
14 years ago
Kristian Høgsberg
da846ca91d
Fix terminal resizing
...
Get snapping to character grid working again, avoid crashes when attempting
to resize below 1x1 character cell, only redraw when size actually changes.
Also, rename window_get_child_rectangle() to window_get_child_allocation().
14 years ago
Kristian Høgsberg
82da52b15b
Update surface.attach and change surface.map to surface.map_toplevel
...
The new map_toplevel() request no longer specifies a position and takes
the size from the attached buffer. The attach request now takes a
position relative to the top-left corner of the old buffer to let
clients specify the relative position of the new buffer.
14 years ago
Kristian Høgsberg
2bb3ebe1e4
Create socket in /var/run/user/${HOME}
...
Use the runtime dir from XDG Base Directory Specification for creating the
socket in a directory only the user can read and write.
14 years ago
Yuval Fledel
e9f5e36730
Make clients exit orderly when there is no connection
14 years ago
Kristian Høgsberg
9d69f8e796
Replace commit/ack/frame protocol with simpler sync and frame callbacks
14 years ago
Kristian Høgsberg
43788b13df
Update keyboard focus handler signatures
15 years ago
Kristian Høgsberg
f252d6a98e
Update to use eglGetDRMDisplayMESA()
15 years ago
Kristian Høgsberg
c8c3734ef9
Set window user data using separate function
15 years ago
Kristian Høgsberg
80d746f6e3
Consolidate redraw scheduling in window.c
15 years ago
Kristian Høgsberg
0953162db8
Fix resizing
15 years ago
Kristian Høgsberg
478d9265f9
Send device name at connect time
15 years ago