Commit Graph

98 Commits

Author SHA1 Message Date
twinaphex 060753258a Combine input_driver.c and input_keyboard.c 2017-06-11 17:51:12 +02:00
twinaphex ddf779008a Update 2017-05-20 19:48:02 +02:00
twinaphex 5a9dbf7e4f Merge keyboard files for udev/x11 2017-05-20 19:44:04 +02:00
twinaphex b0398c1482 C89 build fixes 2017-05-19 03:34:53 +02:00
twinaphex b97c8a183d Update log 2017-03-24 01:38:23 +01:00
twinaphex 7579d68272 Cleanups 2017-03-24 00:15:17 +01:00
twinaphex 62aa0c4415 Split up dbus functions into separate file 2017-03-24 00:12:21 +01:00
twinaphex 805470072b Make desktop_mode a static variable inside x11_common.c 2017-03-23 20:07:56 +01:00
twinaphex 1ce3b12335 Split up xinerama functions into separate files 2017-03-23 19:59:11 +01:00
twinaphex 09e7186a4e Start splitting up xinerama functions 2017-03-23 19:46:06 +01:00
twinaphex 4c0ce28e6e (x11_common.c) Cleanups 2017-03-23 19:36:39 +01:00
twinaphex 6247d6ea1d Update check_window - we no longer need runloop.h inside context driver 2017-01-23 01:02:33 +01:00
twinaphex 96c8ca5a09 Header update #1 2017-01-22 13:40:32 +01:00
twinaphex 6c108a8d27 Shows titlebar text again with X11 2017-01-19 17:58:00 +01:00
Brad Parker b44c8c9995 store buffer for window title, only update actual title when it changes 2017-01-19 00:33:52 -05:00
twinaphex 34da27c36b Don't need 'frame_count' variable for check_window 2017-01-18 21:47:12 +01:00
twinaphex 6247e9900b Remove another header include 2017-01-18 17:46:08 +01:00
twinaphex a6a4808e94 Refactor frame monitor code 2017-01-18 17:41:27 +01:00
twinaphex 23017e0b45 Cleanups 2017-01-13 16:57:57 +01:00
twinaphex 34d5f609f7 (x11_common.c) Cleanups 2017-01-10 21:54:48 +01:00
twinaphex 36fb6776b2 Don't grab settings pointer in video_monitor_get_fps function 2017-01-09 15:42:14 +01:00
twinaphex 3d92ce140e Pass video_frame_info_t to update_window_title 2017-01-09 14:42:07 +01:00
twinaphex 77e5cdbfde Revert "Rename runloop_msg_queue_push to video_driver_msg_queue_push"
This reverts commit ad7386913c.
2016-12-22 23:36:11 +01:00
twinaphex ad7386913c Rename runloop_msg_queue_push to video_driver_msg_queue_push
and move code to video_driver.c
2016-12-22 13:15:02 +01:00
twinaphex 5ca7344436 Get rid of more implicit memsets 2016-12-19 19:17:23 +01:00
twinaphex a5d4032d01 (X11) Cleanups 2016-12-15 12:37:14 +01:00
twinaphex 2f171c4b5d (x11_common.c) Cleanups 2016-12-04 03:39:51 +01:00
twinaphex c3ab8800f4 Prevent implicit memsets 2016-10-21 05:57:40 +02:00
twinaphex f75a604ae8 Fix C89_BUILD 2016-10-16 01:51:07 +02:00
Torsten Paul d4a90f267d Fix handling of enable flag for xdg-screensaver. 2016-10-10 19:01:41 +02:00
twinaphex 91b1889873 (X11) Mouse input is no longer registered when we are on the
titlebar of the window or we are no longer inside the window
2016-10-03 06:50:00 +02:00
twinaphex 7bd38d93f0 (X11) Cleanup x11_alive 2016-10-01 12:12:58 +02:00
twinaphex cb17c0f493 Style nits 2016-09-16 13:31:18 +02:00
Bastien Nocera 5afdd35e54 x11: Only call out to xdg-screensaver when D-Bus failed 2016-09-16 13:03:48 +02:00
Bastien Nocera a061b4a801 x11: Implement xdg-screensaver uninhibition 2016-09-16 13:03:37 +02:00
Bastien Nocera e563bd5512 x11: Flatten D-Bus (un)inhibit functions
Instead of nesting, try to exit as soon as possible in case of errors.
Also make sure to tell the caller whether the call succeeded and a
fallback should be attempted.
2016-09-16 12:59:16 +02:00
Bastien Nocera 297c9a8613 x11: Reset dbus_connection global variable on exit
To ensure that the state of the variable is correct. This won't be
needed if X11 is never reinitialised.
2016-09-16 12:34:15 +02:00
Bastien Nocera 6ab7fab326 x11: Lower the severity of D-Bus not being accessible
As there is a fallback through xdg-screensaver, no need to make this any
more important than a log message.
2016-09-16 12:32:22 +02:00
Bastien Nocera 65fa874c3a x11: Rename function fetching the D-Bus connection
You'd expect a "get" function to return the variable in question. This
doesn't, and simply sets a global variable.
2016-09-16 12:32:15 +02:00
Alcaro f6b7fc17f6 Those checks aren't needed. 2016-09-16 00:45:00 +02:00
twinaphex 1b46f3c344 Nits 2016-09-14 15:58:53 +02:00
twinaphex f87dbe7946 Style nits/cleanups 2016-09-14 15:58:03 +02:00
twinaphex ca673b4fc8 C89_BUILD fixes etc. 2016-09-14 15:56:14 +02:00
nguillaumin c69c488fdf Address code review comments 2016-09-09 18:08:54 -07:00
Nicolas Guillaumin 05df632bd8 WIP: Fixes #2026 Screensaver suspend on Linux via Dbus
One some systems (tested with Gnome 3 on Arch Linux) the current method
of using `xdg-screensaver` to suspend the screensaver does not work.
Instead, using DBus to issue an `Inhibit` request is recommended.

The request returns a cookie that needs to be re-used to un-inhibit the
screensaver later. Additionally if the DBus connection is closed the
current inhibition is discarded. Thus, the DBus connection needs to stay
connected for the duration of the screenshot inhibition.

The code is heavily inspired from the [SDL 2.x
code](http://hg.libsdl.org/SDL/file/default/src/core/linux/SDL_dbus.c#l172).
I didn't call the SDL 2 code though since this it to fix the issue with
the GL driver, and I assume one would want to have screensaver inhibited
even when SDL 2 is not available (but GL is).

I've set "WIP" because:
* I haven't done C in a long time so my code is probably not great
* There's a dependency on DBus which I don't know is acceptable or
not
* I've put my code where I could to check it works, but `x11_common` may
not be the best place
* The code need and "init" and "deinit" kind of method as it needs to
initialise the DBus connection, and on deinit close it properly. I've
used `x11_connect` and `x11_window_destroy` but they don't sound like
the best choices.
* I'm a bit unclear as to what happens when "suspend screensaver" is
ticked on/off in the menu. This doesn't seem to call
`x11_suspend_screensaver` everytime, so I'm not sure if there's a hook
somewhere (as disabling screensaver suspend in the menu should cause a
DBus unhinibit request to be sent).
* Should I just call the SDL 2.x code (meaning that the GL driver would
depend on SDL 2.x at runtime)?

So, first of all are you ok with the approach, and if yes I'd gladly get
feedback about the code, how to architecture it and the best place to
put it.

Thanks!
2016-09-08 15:23:41 -07:00
twinaphex b43f786f89 Cleanups 2016-09-08 08:15:40 +02:00
twinaphex b580599710 (X11) Fix 'quit' button not working 2016-07-09 12:09:39 +02:00
twinaphex 76cc6fd8ec Start implementing signal handler code once in frontend driver code 2016-07-08 02:38:33 +02:00
twinaphex 7d12408f24 x11_create_input_context - prevent memleak 2016-05-26 07:34:25 +02:00
twinaphex 9c1885a46e Fix Display FPS 2016-05-08 22:00:30 +02:00