aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ImagePreview.cpp5
-rw-r--r--src/Text.cpp5
-rw-r--r--src/Video.cpp5
-rw-r--r--src/main.cpp5
4 files changed, 9 insertions, 11 deletions
diff --git a/src/ImagePreview.cpp b/src/ImagePreview.cpp
index 683bc1f..424aefa 100644
--- a/src/ImagePreview.cpp
+++ b/src/ImagePreview.cpp
@@ -73,9 +73,8 @@ namespace dchat
if(event.type == sf::Event::MouseButtonPressed && mouseInside && !imagePreviewUrl.empty())
{
// TODO: Implement for other platforms than linux
- std::string cmd = "xdg-open '";
- cmd += escapeCommand(imagePreviewUrl);
- cmd += "'";
+ std::string cmd = "xdg-open ";
+ cmd += escapeCommandArg(imagePreviewUrl);
printf("Clicked on web page preview, opening web page by running command: %s\n", cmd.c_str());
system(cmd.c_str());
}
diff --git a/src/Text.cpp b/src/Text.cpp
index 6e3aac9..3c26b5a 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -779,9 +779,8 @@ namespace dchat
if(event.x >= pos.x && event.x <= pos.x + previewWidth && event.y >= pos.y && event.y <= pos.y + imageHeight)
{
// TODO: Implement for other platforms than linux
- std::string cmd = "xdg-open '";
- cmd += escapeCommand(utf8Str);
- cmd += "'";
+ std::string cmd = "xdg-open ";
+ cmd += escapeCommandArg(utf8Str);
printf("Clicked on web page preview, opening web page by running command: %s\n", cmd.c_str());
system(cmd.c_str());
return;
diff --git a/src/Video.cpp b/src/Video.cpp
index 4ef3128..2b32daf 100644
--- a/src/Video.cpp
+++ b/src/Video.cpp
@@ -70,8 +70,9 @@ namespace dchat
if(mpv_initialize(mpv) < 0)
throw VideoInitializationException("Failed to initialize mpv");
- mpv_set_option_string(mpv, "vo", "opengl-cb");
- mpv_set_option_string(mpv, "hwdec", "auto");
+ // TODO: Enable this again, but right now it can caused Xorg process to use 100% cpu.
+ //mpv_set_option_string(mpv, "vo", "opengl-cb");
+ //mpv_set_option_string(mpv, "hwdec", "auto");
if(loop)
mpv_set_option_string(mpv, "loop", "inf");
mpvGl = (mpv_opengl_cb_context*)mpv_get_sub_api(mpv, MPV_SUB_API_OPENGL_CB);
diff --git a/src/main.cpp b/src/main.cpp
index 1ae5eb6..92d70b0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -160,9 +160,8 @@ int main(int argc, char **argv)
#endif
if(request.room->localUser && request.room->localUser != request.message->creator)
{
- string cmd = "notify-send dchat '";
- cmd += escapeCommand(request.message->text);
- cmd += "'";
+ string cmd = "notify-send dchat ";
+ cmd += escapeCommandArg(request.message->text);
system(cmd.c_str());
}
}