Commit graph

103 commits

Author SHA1 Message Date
Ivo Wetzel
1b7a3cd31f Correctly apply initial size constraints for x11 windows. 2016-03-25 19:52:57 +01:00
Ivo Wetzel
7a5e47c446 Merge branch 'master' into x11_window_size_constraints 2016-03-25 02:54:40 +01:00
tomaka
0cf1f01990 Merge pull request #746 from Thinkofname/hide-cursor-state-x11
Implement CursorState::Hide for x11
2016-03-24 07:37:58 +01:00
Thinkofname
5c4bfe1379 Remove a debug print added in 1de66e4ef 2016-03-21 18:49:00 +00:00
Thinkofname
267221af3e Implement CursorState::Hide for x11 2016-03-21 18:42:54 +00:00
Manish Goregaokar
1de66e4efb Add support for navigation keys 2016-03-17 16:04:03 +05:30
Ivo Wetzel
7473d99c2f Implement min/max_dimensions for x11 windows.
Size hints are only being set for non-fullscreen windows, if
`max_dimensions` are set they'll override the normal `dimensions`
since X11 will not automatically resize the window after setting
the size hints.

`PSize` hint is currently set along with the `min/max` hints for
good measure.
2016-03-06 20:52:46 +01:00
Patrick Walton
7886ff9acd Add phases to wheel events.
Needed for apps to support overscroll on the Mac.
2016-03-03 16:49:35 -07:00
Kirill Zdornyy
74a28adba2 Fix this_platform_is_not_supported on OpenBSD.
I followed the steps of @mneumann.
2016-03-01 18:06:13 -08:00
tomaka
3246613a51 Merge pull request #709 from gdamjan/support-utf8-window-title
support utf8 window titles via _NET_WM_NAME standard
2016-02-03 10:13:14 +01:00
Michael Howell
0a43f8f733 Allow it to work under Xvfb.
Part of servo/servo#8641
2016-01-19 09:44:33 -07:00
Damjan Georgievski
e9fc0eeb87 call set_title() in new()
…instead of low-level X11 calls that don't work with utf8
2016-01-17 18:52:21 +01:00
Damjan Georgievski
c923b27cad support utf8 window titles via _NET_WM_NAME standard
based on this freerdp patch
9767f7f042

thanks to emiliocobos on irc
2016-01-17 18:52:13 +01:00
Emilio Cobos Álvarez
4d729164c7 x11: Poll the window until it is really visible
Fixes #697

It seems that `XSync` doesn't really makes the window viewable.

This feels hacky, other option to do it could be using `XIfEvent` or
similar to listen to `MapNotify` events, but we'll have a loop still.

In practice, this lasts between two and thre iterations on my machine,
which is something not noticeable.
2016-01-16 18:19:56 +01:00
tomaka
88e64a87a9 Merge pull request #700 from ecoal95/querydevice-leak
x11: Prevent leak on XIQueryDevice
2016-01-07 15:44:43 +01:00
Emilio Cobos Álvarez
21b9245ccc x11: Prevent leak on XIQueryDevice
Per http://linux.die.net/man/3/xiquerydevice:

> XIFreeDeviceInfo frees the information returned by
> XIQueryDevice.
2016-01-06 17:44:26 +01:00
Pierre Krieger
8319043298 Fix wrong screen ID used on GLX 2016-01-05 18:06:30 +01:00
Pierre Krieger
82f5cd8272 Add better X error handling 2015-12-30 14:58:07 +01:00
Pierre Krieger
033d92aae5 Only call XSetInputFocus if the window is visible 2015-12-24 11:58:50 +01:00
Pierre Krieger
360d2bf452 Call XSync before XSetInputFocus 2015-12-24 11:55:39 +01:00
Emilio Cobos Álvarez
a69ded9c8a x11: Improve xlib error reporting 2015-12-15 13:56:35 +01:00
tomaka
48a02a0c8c Merge pull request #659 from Aceeri/minmaxwindow
Minimum/maximum dimensions for windows in win32 API
2015-12-05 18:01:55 +01:00
Olaf Buddenhagen
32ed86a976 Fix compilation for 32 bit targets
Regression introduced in 47df0e9eaa

Casting fullscreen_atom (which is the result from XInternAtom, i.e.
c_ulong) as i64 is obviously wrong -- the whole point of types such as
c_ulong is that long in C does *not* always have the same bit size...

Cast it as c_long instead.

While this is the most straightforward fix, I'm not sure it's the best
one: perhaps the x11 crate should offer a set_ulong() method along with
set_long(), which could be used here instead of the cast?
2015-11-30 09:13:08 +01:00
tomaka
6a3ee2af75 Merge pull request #646 from adambadawy/master
Fix fullscreen on X11
2015-11-11 20:38:12 +01:00
Aceeri
2be3c142f0 Fixed wrong variable binding for WindowAttributes on asserts 2015-11-09 03:29:26 -08:00
Aceeri
9a05577df8 Not implemented asserts to prevent silent fails 2015-11-09 03:18:48 -08:00
Pierre Krieger
37262fb228 Remove public exports of gl_common and libc 2015-11-09 08:46:52 +01:00
Daggerbot
7e4f795a53 Change some uses of c_void to avoid libc version conflicts. 2015-11-04 08:21:42 -08:00
Adam Badawy
c068a770f0 Update x11-dl 2015-10-27 03:22:13 -04:00
Adam Badawy
10f5528c14 Fix using garbage memory 2015-10-27 03:10:57 -04:00
Adam Badawy
d1a5730374 Remove deprecated comment 2015-10-27 03:09:52 -04:00
Adam Badawy
f9929fab2f Use mode when switching to fullscreen 2015-10-27 03:07:37 -04:00
Adam Badawy
4f8095816e Allow any mode larger than requested dimensions
We were previously allowing only fullscreen modes which were exactly as
tall as the requested dimensions, perhaps erroneously.
2015-10-27 00:33:48 -04:00
Adam Badawy
23a5104098 Comment fullscreen XClientMessage code 2015-10-26 05:33:01 -04:00
Adam Badawy
47df0e9eaa Fix misbehaving fullscreen window 2015-10-26 04:06:40 -04:00
Adam Badawy
ed8dfa9a52 Fix issue #509
Focusing the newly created window seems to grab the keyboard.
2015-10-25 21:56:49 -04:00
Adam Badawy
918dc67992 Fix issue #582
I switched `vsyncstart` and `vdisplay` again, as per the discussion on
issue #582.
2015-10-25 21:52:20 -04:00
Matt Brubeck
8c0dfe19c2 Change X11 events based on multitouch option
* If `multitouch` is enabled, touch input generates touch events.
* If `multitouch` is disabled, touch input generates emulated mouse events.
2015-10-23 08:01:03 -07:00
Pierre Krieger
7a625ef3d8 Remove the window feature entirely 2015-10-03 10:33:37 +02:00
Pierre Krieger
8c6a27d426 Add an os module containing platform-specific traits 2015-10-03 09:53:37 +02:00
Pierre Krieger
86fa1b58e5 Rename MonitorID -> MonitorId 2015-09-24 09:11:59 +02:00
Pierre Krieger
aa9cb99929 Add #[inline] attributes 2015-09-23 13:11:47 +02:00
Pierre Krieger
5182023fd6 Switch X11 and wayland to the new design 2015-09-21 12:04:33 +02:00
Pierre Krieger
b5d0a3eb67 Convert GLX to the new design 2015-09-21 12:03:59 +02:00
Pierre Krieger
3054e2ee02 Switch EGL to use only pf_reqs and opengl 2015-09-21 12:03:57 +02:00
Pierre Krieger
48fe9b2644 Extract WindowAttributes from the BuilderAttribs 2015-09-21 12:03:55 +02:00
Pierre Krieger
c244f8c033 Extract GlAttributes from BuilderAttribs 2015-09-21 12:03:55 +02:00
Pierre Krieger
82bb047fda Report the error from x11-rs when failing to open shared libraries 2015-09-20 08:48:53 +02:00
Pierre Krieger
b9a4f5fbe9 Err when a X connection cannot be created instead of panicking 2015-09-20 08:42:32 +02:00
tomaka
08cb668037 Merge pull request #580 from mbrubeck/scroll-lines
Fix smooth-scrolling increment on some X11 devices
2015-09-01 07:29:59 +02:00